Skip to content

Commit

Permalink
Accessibility: all description links now show to screen readers as de…
Browse files Browse the repository at this point in the history
…scription buttons, allowing screen readers to go down long lists of buildings and queue techs 2x faster. (pmotschmann#1050)
  • Loading branch information
Keithcat1 authored Feb 15, 2024
1 parent d270f7e commit 28b8efe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5410,7 +5410,7 @@ export function setAction(c_action,action,type,old,prediction){
}
if (prediction){ clss = ' precog'; }
let active = c_action['highlight'] ? (c_action.highlight() ? `<span class="is-sr-only">${loc('active')}</span>` : `<span class="is-sr-only">${loc('not_active')}</span>`) : '';
element = $(`<a class="button is-dark${cst}${clss}"${data} v-on:click="action"><span class="aTitle" v-html="$options.filters.title(title)"></span>${active}</a><a v-on:click="describe" class="is-sr-only">{{ title }} description</a>`);
element = $(`<a class="button is-dark${cst}${clss}"${data} v-on:click="action"><span class="aTitle" v-html="$options.filters.title(title)"></span>${active}</a><a role="button" v-on:click="describe" class="is-sr-only">{{ title }} description</a>`);
}
parent.append(element);

Expand Down

0 comments on commit 28b8efe

Please sign in to comment.