ui5-select: [a11y] the aria-label of ui5-select is overridden by the aria-labelledby attribute
See original GitHub issueDescribe the bug When set the aria-labelledby attribute in ui5-select, the screen reader will not output the label defined instead of the text of selected option
To reproduce Steps to reproduce the behavior: Considering following case,
<ui5-label id="myLabel3" for="mySelect" required show-colon>Job</ui5-label>
<ui5-select id="mySelect" aria-required="true" aria-labelledby="myLabel3">
<ui5-option>Manager</ui5-option>
<ui5-option>Sales</ui5-option>
<ui5-option selected>Developer</ui5-option>
</ui5-select>
Expected behavior The label of ui5-select should be output by screen reader
Screenshots Please refer to the DOM structure in the screenshot
Context
- UI5 Web Components version: 0.23.1
- OS/Platform: MacOs
- Browser (if relevant): Chrome
- Other information: screen reader - NVDA
Affected components (if known) ui5-select
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
ARIA Labeling - Documentation - Demo Kit - SAPUI5 SDK
Attribute is maintained on the labeled control. Only indirect support for multiple texts. The aria-labelledBy attribute. Whitespace separated list of ID ...
Read more >Best Practices for ARIA Labeling - SAPUI5 - SAP Help Portal
Sometimes the UI and the control usage may not allow standard ARIA labeling. Here we introduce some best practices on handling the labels...
Read more >Accessibility - UI5 Web Components - SAP
Those labels are passed as a concatenated string to the aria-label attribute. accessibleRole, role, Sets the accessible aria role of the component.
Read more >UI5: How to use Association 'ariaLabelledBy'? - Stack Overflow
ARIA (Accessible Rich Internet Applications) is a set of attributes that helps people with disabilities to access a web page e.g. with a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here is some documentation about the relationship between
aria-label
andaria-labelledby
. https://developers.google.com/web/fundamentals/accessibility/semantics-aria/aria-labels-and-relationshipsSo maybe this is the cause of my issue.
Hello @zhangliangyi,
The internal aria-labelledby is removed when the role was changed to combobox, because it provides different accessibility behavior.