mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 16:45:32 +08:00
A11Y: makes select-kit header a listbox (#12078)
Note that for now pressing enter doesn’t make anything, this is awaiting another change.
This commit is contained in:
parent
85c4e8fd32
commit
323a5f22e7
@ -28,7 +28,7 @@ export default Component.extend(UtilsMixin, {
|
||||
"ariaOwns:aria-owns",
|
||||
"ariaHasPopup:aria-haspopup",
|
||||
"ariaIsExpanded:aria-expanded",
|
||||
"roleButton:role",
|
||||
"headerRole:role",
|
||||
"selectedValue:data-value",
|
||||
"selectedNames:data-name",
|
||||
"buttonTitle:title",
|
||||
@ -72,7 +72,7 @@ export default Component.extend(UtilsMixin, {
|
||||
return `${this.selectKit.uniqueID}-body`;
|
||||
}),
|
||||
|
||||
roleButton: "button",
|
||||
headerRole: "listbox",
|
||||
|
||||
tabindex: 0,
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
{{#if selectKit.options.showFullTitle}}
|
||||
<div role="button" lang={{lang}} {{action "onSelectedNameClick"}} title={{title}} data-value={{value}} data-name={{name}} class="select-kit-selected-name selected-name choice">
|
||||
<div tabindex="0" role="button" lang={{lang}} {{action "onSelectedNameClick"}} title={{title}} data-value={{value}} data-name={{name}} class="select-kit-selected-name selected-name choice">
|
||||
{{#if item.icon}}
|
||||
{{d-icon item.icon}}
|
||||
{{/if}}
|
||||
|
@ -72,6 +72,10 @@
|
||||
display: flex;
|
||||
outline: none;
|
||||
|
||||
&:focus .d-icon-times {
|
||||
color: var(--danger);
|
||||
}
|
||||
|
||||
.d-icon + .name {
|
||||
margin-left: 0.5em;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user