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

cc-header-orga: hide initials from screen readers #885

Closed
florian-sanders-cc opened this issue Nov 15, 2023 · 0 comments · Fixed by #882 or #876
Closed

cc-header-orga: hide initials from screen readers #885

florian-sanders-cc opened this issue Nov 15, 2023 · 0 comments · Fixed by #882 or #876
Assignees
Labels
a11y Related to accessibility bug Something isn't working

Comments

@florian-sanders-cc
Copy link
Contributor

Context

When the organization has no avatar, the cc-header-orga component displays the organization initials instead.

It relies on the accessible-name (previously named text) to do so but this means screen reader users may hear graphic CC for the Clever Cloud logo for instance.

This is not a big deal but both initials or the image could be considered decorative and we could avoid creating confusion by simply hiding these from screen readers.

Solution

  • When the org has an avatar, keep on relying on the cc-img but without setting an accessible-name.
  • When the org has no avatar, rely on a custom <span aria-hidden="true"> from within the cc-header-orga component to insert the initials.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y Related to accessibility bug Something isn't working
Projects
None yet
1 participant