SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.56k stars 267 forks source link

a11y issue: Tree item at level 2 is not announced correctly by screen reader. #2553

Closed lateefsofi closed 3 years ago

lateefsofi commented 3 years ago

Tree item at level 2 is not announced correctly by screen reader. Consider Basic Tree to understand the issue. When screen reader user navigates through the tree at level 2 i.e Tree 1.1 as per example , screen reader announces 1 of 3 but actually it should announce 1 of 1, because there is only 1 item under its parent. Similarly if you navigate to the level 2 under Tree 2, for the first item screen reader announces 2 of 3 which is again incorrect, it should be 1 of 2.

To reproduce Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/Tree
  2. When screen reader user navigates through the tree at level 2 i.e Tree 1.1 as per example , screen reader announces 1 of 3 but actually it should announce 1 of 1, because there is only 1 item under its parent. Similarly if you navigate to the level 2 under Tree 2, for the first item screen reader announces 2 of 3 which is again incorrect, it should be 1 of 2.

Expected behavior Items should be announced to screen readers correctly.

Screenshots image

Context

Affected components (if known) Tree

Organization: (if applicable) SuccessFactors

Priority: (optional) (Low, Medium, High or Very High) High

NHristov-sap commented 3 years ago

Hi,

The issue is reproducible. Sometimes (for level 0) it reads properly, but the problem is when the whole tree is expanded, especially in Tree 2 and its sub-trees (when expanded). There are correct announcements of the Tree nodes, but incorrect announcements for number of items (X of Y). Please check!

Best Regards, Nikolay Hristov (GitHub Dispatcher)