-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for adding ACC descriptive text to a component #6445
Labels
Comments
This was referenced Feb 21, 2023
4 tasks
4 tasks
Additional use case for ui5-input from SF: Is there a way to set the ariaDescribedBy/ariaDescription properties from the Input WC without having to override the whole get accInfo( ). |
dobrinyonkov
added a commit
that referenced
this issue
Nov 12, 2024
Related to: #6445 Description This PR adds support for the aria-describedby and the aria-description attribute to the ui5-list and ui5-tree components. These attributes allows developers to provide a reference to an element that describes the list or a string value, which can be read by screen readers. Example aria-description A property accessibleDescription is added to the ui5-list and ui5-tree components. When set, the value of this property will be used as the accessible description of the list. <ui5-list accessible-description="This is a list of items">...</ui5-list> <ui5-tree accessible-description="This is a tree of items">...</ui5-tree> aria-describedby A property accessibleDescriptionRef is added to the ui5-list and ui5-tree components. When set, the value of this property will be used as the id of the element that describes the list. <p id="description">This component has description</p> <ui5-list accessible-description-ref="description">...</ui5-list> <ui5-tree accessible-description-ref="description">...</ui5-tree> Changes ui5-list and ui5-tree components now support the accessibleDescription and accessibleDescriptionRef properties An already existing utility named AriaLabelHelper was extended with a new methods getEffectiveAriaDescriptionText and getAllAccessibleDescriptionRefTexts to handle the new properties, similar to the ones for the aria-label attribute the name of the utility was changed to AccessibleTextsHelper to better reflect its purpose the ui5-list now subscribes for changes of the referenced elements using the AccessibleTextsHelper to update the aria-description and aria-label attribute of the list as well the ui5-tree only forwards the values to the internal ui5-tree-list which handles the property to attribute transformation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request Description
Give the developers the possibility to add accessible description text in ui5-webcomponents. For this we need to test possible approaches and extend/reuse the existing AriaLabelHelper util.
Proposed Solution
Similar to the accessibleName and accessibleNameRef, one should be able to add accessible description via an attribute (accessibleDescription/accessibleDescriptionRef). After the merge of #6364 we should extend the logic of the AriaLabelHelper (or re-use it) to cover this functionality. It could be achieved in two ways:
Additional Context
<span id="descriptive-text">Element Description</span> <ui5-combobox accessible-description-ref="descriptive-text"></ui5-combobox> .... document.getElementById("descriptive-text").innerHTML = "New Description"
-here the accessible description in the shadow DOM should be updated to New Description as well.
Priority
A clear and concise description of the impact/urgency of the required feature.
Related Issues
Notice that the feature is requested several times:
aria-describedby
to innerbutton
element #5310All of them should be evaluated again (before enabling them), since in most cases the better approach is to label the element and to not add a description to it. Nevertheless the aria-describedby is not announced for certain roles and each case should be tested separately.
Please link other issues related to this if some component is missing.
Expected result
The text was updated successfully, but these errors were encountered: