We use ionic framework for a mobile application that also has a desktop representation (therefore we use ionic on desktop as well where applicable). Ionic uses web components and many have a shadow DOM.
When NVDA is running, tabbing to components that have a shadow DOM does not occur. Instead, NVDA's yellowish focus rectangle can be seen on the last tabbable control. If you hit enter or the space bar to trigger what you think is the current control, it triggers the last control instead.
We find this problem with ionics <ion-select> and <ion-toggle>. However, it does not occur with <ion-input> b/c this web component does not have a shadow DOM.
The shadow DOM is hidden behind element.shadowRoot. Therefore statements like parentElement.querySelectorAll('') will skip the shadow DOM elements. Perhaps this is why NVDA is not able to handle these types of components?
Example:
Tab thru a page with a button and an ion-select. Ionic make it look like the ion-select has focus but NVDA still shows the yellowish focus rectangle still on the button. Therefore when you press the enter key, the button is triggered instead of the ion-select.
We use ionic framework for a mobile application that also has a desktop representation (therefore we use ionic on desktop as well where applicable). Ionic uses web components and many have a shadow DOM.
When NVDA is running, tabbing to components that have a shadow DOM does not occur. Instead, NVDA's yellowish focus rectangle can be seen on the last tabbable control. If you hit enter or the space bar to trigger what you think is the current control, it triggers the last control instead.
We find this problem with ionics
<ion-select>
and<ion-toggle>
. However, it does not occur with<ion-input>
b/c this web component does not have a shadow DOM.The shadow DOM is hidden behind
element.shadowRoot
. Therefore statements likeparentElement.querySelectorAll('')
will skip the shadow DOM elements. Perhaps this is why NVDA is not able to handle these types of components?Example: Tab thru a page with a button and an ion-select. Ionic make it look like the ion-select has focus but NVDA still shows the yellowish focus rectangle still on the button. Therefore when you press the enter key, the button is triggered instead of the ion-select.
This blog post describes the issue very well: https://nolanlawson.com/2021/02/13/managing-focus-in-the-shadow-dom/