Skip to content

Commit

Permalink
FIX: add tabindex=-1 on tabLoc post links
Browse files Browse the repository at this point in the history
This prevents tabbing from confusing screenreaders, as having default tabindex
with aria-hidden confuses screenreaders
  • Loading branch information
featheredtoast committed May 11, 2020
1 parent 90b9007 commit e744b9e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/assets/javascripts/discourse/app/widgets/post.js
Expand Up @@ -556,7 +556,9 @@ createWidget("post-article", {

html(attrs, state) {
const rows = [
h("a.tabLoc", { attributes: { href: "", "aria-hidden": true } })
h("a.tabLoc", {
attributes: { href: "", "aria-hidden": true, tabindex: -1 }
})
];
if (state.repliesAbove.length) {
const replies = state.repliesAbove.map(p => {
Expand Down

0 comments on commit e744b9e

Please sign in to comment.