Skip to content
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

accessibility Issue: “Ensures every ARIA input field has an accessible name” - for UI5 web components (ui5-list). #1886

Closed
riteshfsd opened this issue Jun 30, 2020 · 2 comments · Fixed by #1899

Comments

@riteshfsd
Copy link

Describe the bug
I am facing an issue related to accessibility tests for UI5 web components (ui5-list). Issue description: “Ensures every ARIA input field has an accessible name”

To reproduce
Steps to reproduce the behavior:

  1. I am wrapping divs with ui5-list component
  2. I have given these attributes for ui5-list (shouldRenderH1 header-text="Test" ariaLabelledBy="label-test")

Expected behavior
I Should not get the error "Ensures every ARIA input field has an accessible name"

Screenshots
image
image

Context

  • UI5 Web Components version
  • OS/Platform: {}
  • Browser (if relevant): {...}
  • Other information: {...}

Affected components (if known)

Log output / Any errors in the console

{...}
@ilhan007 ilhan007 self-assigned this Jun 30, 2020
@ilhan007
Copy link
Member

ilhan007 commented Jul 1, 2020

Hi @riteshfsd

Just few notes:

shouldRenderH1 is not an attribute or property of the List, it is a private read-only getter that calculates if the list
should render internal header in case there is no external one. So shouldRenderH1 is obsolete, does nothing and should be removed.

header-text is a public API, but from the code you attached I can see that slot="header" is used. And, the slot takes precedence over the "header-text" and the List does not render internal header, but displays the one set with the slot="header".

If you remove the <div slot="header", you will see the internal header and aria-labelledby pointing to it:

Screenshot 2020-07-01 at 8 45 52 AM

The support of setting aria-labelledBy="label-test" on the <ui5-list> is missing and we are going to provide it in regards to this issue.

@ilhan007 ilhan007 added the ACC label Jul 1, 2020
ilhan007 added a commit that referenced this issue Jul 2, 2020
Add support for aria-label and aria-labelledby:
- if aria-label or aria-labelledby are set externally, aria-label is set inside the shadowDOM.
- if not, aria-labelledby is set to reference the internal header, when the header-text property is set.
It is now possible to label the list as shown:

FIXES: #1886
@ilhan007
Copy link
Member

ilhan007 commented Jul 2, 2020

Hello @rimasirich
after we release this fix you will be able to set aria-label or aria-labelledby on ui5-list.

The change: #1899

Also,
read my previous comment where I explain the role of shouldRenderH1 and header-text.

ilhan007 added a commit that referenced this issue Jul 2, 2020
Add support for aria-label and aria-labelledby:
- if aria-label or aria-labelledby are set externally, aria-label is set inside the shadowDOM.
- if not, aria-labelledby is set to reference the internal header, when the header-text property is set.
It is now possible to label the list as shown:

FIXES: #1886
ilhan007 pushed a commit that referenced this issue Jul 30, 2021
Part of #3107 

BREAKING CHANGE: The support for ```aria-labelledby``` have been deprecated in favour of  new attribute ```accessible-name-ref``` for the following components:
- ComboBox (Requested by SF #1916)
- DatePicker (Requested by SF #2107)
- Input (Requested #1866)
- List (Requested by SF #1886)
- Rating Indicator
- Select (Requested by SF #2107)
- StepInput (Implemented as part of the initial implementation #2804)
- TextArea (Requested by SF #2107)
- WizardStep (Implemented as part of the initial implementation #2400)
The ```aria-labelledby``` has been deprecated for the following component:
- Button (Requested by SF #1425)
The ```accessible-name``` has been deprecated for the following components:
- Link (Requested by SF #2356)
 Both ```aria-labelledby``` and ```accessible-name``` have been deprecated for the following components:
- Card (Requested by CBC #2127)
- CheckBox (Requested by SF #2265)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants