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

MessageViewButton: Accessibility, no built-in localized tooltip when severity is different from "Error" #6594

Open
1 task done
ehn-sap opened this issue Nov 5, 2024 · 3 comments · Fixed by #6595 · May be fixed by #6766
Open
1 task done

MessageViewButton: Accessibility, no built-in localized tooltip when severity is different from "Error" #6594

ehn-sap opened this issue Nov 5, 2024 · 3 comments · Fixed by #6595 · May be fixed by #6766

Comments

@ehn-sap
Copy link

ehn-sap commented Nov 5, 2024

Describe the bug

  • A MessageViewButton created with type={ValueState.Negative} displays a localized tooltip ('Error' in English)

  • A MessageViewButton created with any other type (Critical, Positive or Information, for Warning, Success or Information severities) displays no tooltip

Isolated Example

https://sap.github.io/ui5-webcomponents-react/v2/?path=/story/inputs-messageviewbutton--severities

Reproduction steps

  1. Open the demo page
  2. Hover the different buttons
  3. Only the Error button displays a tooltip

Expected Behaviour

Every button should display a localized tooltip, reflecting the severity.

It's an Accessibility requirement, as tooltips are used by screen readers.

Screenshots or Videos

No response

UI5 Web Components for React Version

latest, and previous

UI5 Web Components Version

latest

Browser

Chrome

Operating System

No response

Additional Context

No response

Relevant log output

No response

Organization

No response

Declaration

  • I’m not disclosing any internal or sensitive information.
@ui5-webcomponents-react-bot
Copy link
Contributor

🎉 This issue has been resolved in version v1.29.14 🎉

The release is available on v1.29.14

Your semantic-release bot 📦🚀

@ui5-webcomponents-react-bot
Copy link
Contributor

🎉 This issue has been resolved in version v2.5.0 🎉

The release is available on v2.5.0

Your semantic-release bot 📦🚀

@ehn-sap
Copy link
Author

ehn-sap commented Dec 19, 2024

Added default tooltips are mixed up.
. type: Information => tooltip: 'Success Type'
. type: Positive => tooltip: 'Warning Type'
. type: Negative => tooltip: 'Error Type'
. type: Critical => tooltip: 'Information Type'
. type: None => tooltip: 'Success Type'
This can be seen using the Storybook

In packages/main/src/components/MessageViewButton/index.tsx, the function getTypes is incorrect:
switch (type) {
case ValueState.Negative:
return errorIcon;
return { icon: errorIcon, i18nLabel: ERROR_TYPE };
case ValueState.Positive:
return sysEnter2Icon;
return { icon: sysEnter2Icon, i18nLabel: WARNING_TYPE };
case ValueState.Critical:
return alertIcon;
return { icon: alertIcon, i18nLabel: INFORMATION_TYPE };
default:
return informationIcon;
return { icon: informationIcon, i18nLabel: SUCCESS_TYPE };
}

It seems I do not have the permissions to reopen the issue.
Could you do it, or do I need to open another one?

@Lukas742 Lukas742 reopened this Dec 19, 2024
@Lukas742 Lukas742 linked a pull request Dec 19, 2024 that will close this issue
@Lukas742 Lukas742 removed the released label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🆕 New
3 participants