ui5-webcomponents
ui5-webcomponents copied to clipboard
[SF] [a11y] [Switch] Switch needs tooltip support
Feature Request Description
Tooltip is a string that will be displayed by the browser when the mouse pointer hovers over the switch.
Proposed Solution
Add a tooltip attribute to the switch component similar to the sapUI5 https://sapui5.hana.ondemand.com/#/api/sap.m.Switch%23aggregations
Proposed Alternatives
Ability to modify the shadowroot html to add a span for the tooltip message for the tooltip.
Additional Context
This is an ask to support tooltip caught by a11y testing.
Priority
- [ ] Low
- [x] Medium
- [ ] High
- [ ] Very High
A clear and concise description of the impact/urgency of the required feature.
Stakeholder Info (if applicable)
- Organization: SAP SuccessFactors
- Business impact: Medium
Hello @SAP/ui5-webcomponents-topic-b , take a look of this feature request.
HI @petyabegovska, @unazko,
According to my understanding, according to Fiori tooltips shall not be used on a Switch: https://experience.sap.com/fiori-design-web/using-tooltips/ Or is there some other agreement with UX/ACC for the switch explicitly?
Thanks, Nikolay
Hello @lormanlau,
The requirement will be synced with central ACC expert. Tooltip is not used and recommended in the UI5 control sap.m.Switch, although it has borrowed the aggregation Tooltip.
Best regards, Petya
Hello @lormanlau, @SAP/ui5-webcomponents-topic-b,
We had a discussion on the topic with the central accessibility expert group.
The feedback from there is that it is logical to support tooltip property for the ui5-switch
component.
In cases when an external label to the ui5-switch
is not wanted then currently only an accessible-name
attribute could be provided for the screen reader support. The downside of this approach is that there would be no visual indication for the accessible-name
, but only a screen reader announcement. This would not be the case with a tooltip as then we would have visual indication and screen reader announcement at the same time.
Best Regards, Boyan
Hello @lormanlau,
Could you give us a little bit of context on how the ui5-switch would be used so a tooltip would be needed?
The general guidance for the ui5-switch component is to reference a ui5-label to it as it will always be visible. The tooltip is visible via mouse hovering, but appears to have some limitations in regards to the keyboard triggered focus. Based on the browser used the tooltip might not appear if navigated on via the keyboard (Chrome browser). It will be displayed with Edge browser.
Still a tooltip will be better than an accessible-name.
Best Regards, Boyan
Hi @unazko
Tooltip was an ask by accessibility.
Thanks, Lorman