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

Input with text suffix: VoiceOver reads suffix even though aria-hidden is present #1069

Open
7 of 18 tasks
JoviGriske opened this issue Oct 26, 2022 · 4 comments
Open
7 of 18 tasks
Assignees
Labels
breaking change An issue that when resolved will be a breaking change

Comments

@JoviGriske
Copy link

JoviGriske commented Oct 26, 2022

Prerequisites

  • I have checked the open Issues to see if this has already been raised
  • I have searched the closed Issues to see if a similar bug has been fixed in the past

Description

This bug affects:

  • GitHub workflows
  • Component
  • Config
  • Performance
  • Tooling / Frameworks
  • Documentation
  • Something else

Steps to Reproduce

  1. In Safari, open up Canopy component: Input with text suffix
  2. Start VO
  3. Tab into the input field with the text suffix

Expected behaviour:

'%' is not announced due to aria-hidden

Actual behaviour:

'%' is announced even though aria-hidden is present

Recurrence frequency:

  • Occurs every time
  • Occurs intermittently
  • Unsure

Package version

  • This problem started happening recently
  • This problem started happening a while ago
  • Unsure

Configuration and environment

  • This pertains to local development
  • This pertains to the CI
  • This pertains to Storybook

Additional Information

Working example can be found here: https://designsystem.digital.gov/components/input-prefix-suffix/

Screenshot 2022-10-26 at 11 55 48

Canopy Input with text suffix:
Screenshot 2022-10-26 at 11 54 49

@elenagarrone
Copy link
Contributor

Hey @JoviGriske 👋
Thanks for creating the issue 👍

Just to recap, from the link you shared, the behaviour should be:
Screenshot 2022-10-26 at 12 27 00

So we need to change the code so that the suffixes and prefixes have an aria-hidden attribute.

I would think this will be a breaking change as applications will have to update their form labels to add a more descriptive label.

@st3fun1
Copy link
Contributor

st3fun1 commented Oct 26, 2022

Hey @elenagarrone,

as you said, we have to add an aria-hidden attribute directly on the directives using @HostBinding or some other approach. The underlying issue is that the directive is slotting in the content in its template and, even if you add aria-hidden="true" to that content, the screen reader doesn't take it into account, and it still reads the content.

@elenagarrone
Copy link
Contributor

Added a discussion for possible solution: #1082

@elenagarrone elenagarrone added the breaking change An issue that when resolved will be a breaking change label Nov 1, 2022
@pauleustice
Copy link
Contributor

@AndreiRosu To pick up again and catch up on what needs doing for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change An issue that when resolved will be a breaking change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants