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

ui5-textarea: [a11y] provide aria-label or aria-labelledby property in ui5-textarea #2107

Closed zhangliangyi closed 4 years ago

zhangliangyi commented 4 years ago

Dear colleague,

I am from Successfactors Web Experience Shanghai team.

Describe the bug As the id defined in for property of ui5-label takes no effect to the inner input element in shadow DOM, the aria-label or aria-labelledby property is required for screen reader to identify the linked label.

But so far neither aria-label nor aria-labelledby is exposed from the component.

To reproduce Steps to reproduce the behavior:

  1. Go to https://sap.github.io/ui5-webcomponents/playground/components/Label/
  2. Go to section Label 'for'
  3. Focus to the ui5-textarea and check the output of screen reader.

Expected behavior When focus to the datepicker, select or textarea, the linked label should be read.

Context

Affected components (if known)

Thanks Jacob

ilhan007 commented 4 years ago

Provided aria-label or aria-labelledby property for the following components: ui5-textarea, ui5-datepicker and ui5-select

https://github.com/SAP/ui5-webcomponents/pull/2126 https://github.com/SAP/ui5-webcomponents/pull/2125 https://github.com/SAP/ui5-webcomponents/pull/2124

Best, ilhan