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

[SF][A11y][AXE][ui5-button]: axe error for icon only button #5687

Closed GongRichard closed 2 years ago

GongRichard commented 2 years ago

Bug Description

There has below axe error for icon only button.

elements with an img role must have an alternative text. Please fix it in 1.7.0 ### **Expected Behavior** Set aria-label of with an img role ### **Steps to Reproduce** 1. Go to 'https://sap.github.io/ui5-webcomponents/playground/components/Button/' 2. run axe plugin to scan the page 3. you will see the error ### **Context** - UI5 Web Components version: {1.6.0} - OS/Platform: {macOS} - Browser: {Chrome} - Affected component: {ui5-button} ### **Log Output / Stack Trace / Screenshots** image ### **Priority** - [ ] Low - [x] Medium - [ ] High - [ ] Very High The priority indicates the severity of the issue. To set the appropriate priority consider the following criteria: - Breaks entire application or system - High or Very High - Accessibility issue - Medium or High - Functional issue - Medium or High - Visual issue - Low or Medium **Note:** The priority might be re-evaluated by the issue processor. ### **Stakeholder Info** (if applicable) - Organization: {SAP SuccessFactors} - Business impact: {...}
unazko commented 2 years ago

Hello @SAP/ui5-webcomponents-topic-b,

Some of the icon-only buttons in the playground sample do not have a tooltip and they should. In the ui5-button implementation its is specific that the tooltip comes from the icon directly. Some of ui5-icons do not return any tooltip information though. We should try to provide a tooltip for all icon-only buttons using the tooltip information from the inner icons.

Best Regards, Boyan

unazko commented 2 years ago

Hello @GongRichard,

Please do refer to the following incident: https://github.com/SAP/ui5-webcomponents/issues/5596 for the same issue. There is an answer with recommendations for this use case.

Best Regards, Boyan Rakilovski