mirror of
https://github.com/discourse/discourse.git
synced 2025-02-20 11:48:26 -06:00
A11Y: Fix tab order in "Feature topic" modal (#18576)
Tab order acts strangely in Chrome when the last focusable element in a modal is a radio group: it switches focus to the address bar. This is a problem, because for keyboard users, it becomes very hard to return to the previous context. This PR adds a focusable "Cancel" button, whose mere presence fixes the issue.
This commit is contained in:
parent
e0a6d12c55
commit
74a6a868d2
@ -13,7 +13,7 @@
|
||||
{{#if this.noResults}}
|
||||
<p>{{i18n "choose_topic.none_found"}}</p>
|
||||
{{else}}
|
||||
<div class="choose-topic-list">
|
||||
<div class="choose-topic-list" role="radiogroup">
|
||||
{{#each this.topics as |t|}}
|
||||
<div class="controls existing-topic">
|
||||
<label class="radio">
|
||||
|
@ -4,4 +4,5 @@
|
||||
|
||||
<div class="modal-footer">
|
||||
<DButton @action={{action "save"}} @class="btn-primary save-featured-topic-on-profile" @disabled={{this.noTopicSelected}} @label="user.feature_topic_on_profile.save" />
|
||||
<DButton @action={{route-action "closeModal" }} @label="cancel" @class="btn-flat" />
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user