SAP / openui5

OpenUI5 lets you build enterprise-ready web applications, responsive to all devices, running on almost any browser of your choice.
http://openui5.org
Apache License 2.0
2.95k stars 1.24k forks source link

Covering accessibility standard problem - missing tabIndex property for some xml components #3502

Closed kirebel closed 2 years ago

kirebel commented 2 years ago

OpenUI5 version: 1.99.0

Browser/version (+device/version): Chrome/ Any

Hello, I'm trying to cover an accessibility standard criterion (https://www.w3.org/WAI/WCAG21/Understanding/meaningful-sequence) in my app and I have an issue when I'm using a screen reader to check if everything is readable by the tool. Everything is working fine but when I have to use sap.m.HBox or sap.m.Label component I can't make the screen reader to go through the xml components and read their content. The problem is that this two components don't have a tabIndex property to be set. Can you give me some kind of solution for this problem or recommend another xml components that will do the job(currently I'm setting the tabIndex property by manipulating the DOM tree by the vanilla JS manipulations(doc.getElementById, ect.) but I have some troubles.

unazko commented 2 years ago

Hello @kirebel,

Generally speaking layout elements like the sap.m.HBar are only used for display purposes and aren't focusable. Their content could be focusable if it consists of interactable elements. The tab order in this case depends on the order those elements are added into the sap.m.HBar contents (native tab handling depending on representation of the elements in the DOM tree). I wouldn't recommend to use vanillaJS to change the tab order programmatically. Try instead to order the controls in the sap.HBar contents in the correct display order. The sap.m.Label control is used to reference an input field or in a form element. It is not focusable it self as its purpose is to be announced by the screen readers when the focus goes into the labelled input field. Also the sap.m.Label is a text element and not an interactable element. Not really sure what is the particular case and what tool is used to analyze the accessibility of the page. I would recommend to use the Access Assistant tool for that purpose.

If you need further assistance please provide an JSBin, JSFiddle example and screenshots from the used accessibility analyzer tools and remove the author action label with your reply, in order for the incident to show in the proper filter for us.

Best Regards, Boyan Rakilovski

dimovpetar commented 2 years ago

Hello @kirebel, Since there is no response from the author for more than 4 weeks I'm closing the ticket. Best regards, Petar