A11Y: makes replies count a button and not a link (#12570)
This commit is contained in:
parent
80be6e6949
commit
f14e898f6f
|
@ -1,7 +1,6 @@
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import { fmt } from "discourse/lib/computed";
|
|
||||||
|
|
||||||
export default EmberObject.extend({
|
export default EmberObject.extend({
|
||||||
tagName: "td",
|
tagName: "td",
|
||||||
|
@ -38,5 +37,10 @@ export default EmberObject.extend({
|
||||||
return "";
|
return "";
|
||||||
},
|
},
|
||||||
|
|
||||||
likesHeat: fmt("ratioText", "heatmap-%@"),
|
@discourseComputed("ratioText")
|
||||||
|
likesHeat(ratioText) {
|
||||||
|
if (ratioText && ratioText.length) {
|
||||||
|
return `heatmap-${ratioText}`;
|
||||||
|
}
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<{{view.tagName}} class='num posts-map posts {{view.likesHeat}}' title='{{view.title}}'>
|
<{{view.tagName}} class='num posts-map posts {{view.likesHeat}}' title='{{view.title}}'>
|
||||||
<a href class='posts-map badge-posts {{view.likesHeat}}'>
|
<button class="btn-link posts-map badge-posts {{view.likesHeat}}">
|
||||||
{{raw-plugin-outlet name="topic-list-before-reply-count"}}
|
{{raw-plugin-outlet name="topic-list-before-reply-count"}}
|
||||||
{{number topic.replyCount noTitle="true" ariaLabel=view.title}}
|
{{number topic.replyCount noTitle="true" ariaLabel=view.title}}
|
||||||
</a>
|
</button>
|
||||||
</{{view.tagName}}>
|
</{{view.tagName}}>
|
||||||
|
|
|
@ -274,11 +274,15 @@
|
||||||
|
|
||||||
.num {
|
.num {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
a:not(.badge-posts) {
|
|
||||||
|
a {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
}
|
}
|
||||||
a.badge-posts {
|
|
||||||
font-weight: bold;
|
.badge-posts {
|
||||||
|
font-weight: 700;
|
||||||
|
color: inherit;
|
||||||
|
padding: 15px 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue