Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[Terra-Tag] SR announces instructions twice with VPC ON Mode #3978

Merged
merged 4 commits into from
Nov 24, 2023

Conversation

gt106551
Copy link
Contributor

@gt106551 gt106551 commented Nov 17, 2023

Summary

Fixed-SR announces instructions twice with VPC ON Mode

What was changed:
Removed the aria-live property to prevent JAWS (screen reader) from announcing twice in the Edge browser.
Why it was changed:
When VPC is in ON mode, screen reader announces instruction "11 items are hidden" twice .

Testing

This change was tested using:

  • WDIO
  • Jest
  • Visual testing (please attach a screenshot or recording)
  • Other (please describe below)
  • No tests are needed

Reviews

In addition to engineering reviews, this PR needs:

  • UX review
  • Accessibility review
  • Functional review

Additional Details

This PR resolves:

UXPLATFORM-9812

Thank you for contributing to Terra.
@cerner/terra

@gt106551 gt106551 requested a review from a team as a code owner November 17, 2023 13:46
@@ -74,7 +74,7 @@ const RollUpTag = (props) => {
onBlur={handleOnBlur}
refCallback={(ref) => { rollUpTagRef.current = ref; }}
isCompact
aria-live={(isCollapsed) ? 'polite' : 'off'}
aria-live={(navigator.userAgent.indexOf('Edg') === -1 && isCollapsed && !/^(?=.*\bSafari\b)(?!.*\bChrome\b).*/i.test(navigator.userAgent)) ? 'polite' : 'off'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aria-live is now used only when its either safari or chrome ? Can the expression be simplified ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gt106551 What does this expression validate to ..??

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried to simplify in different ways but getting issues in safari browser

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gt106551 What does this expression validate to ..??

it checks if the user agent string contains 'Safari' but does not contain 'Chrome'.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you need only safari, refer :

if (navigator.userAgent.indexOf('Safari') !== -1 && navigator.userAgent.indexOf('Chrome') === -1) {

Include edge as well in this

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're trying to set aria-live to polite for edge and JAWS. In this case you can refer to some of the existing regEx for edge browser instead of adding new expression from web.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I Have removed aria-live attribute and tested in all browsers it is working as expected.

@github-actions github-actions bot temporarily deployed to preview-pr-3978 November 23, 2023 10:43 Destroyed
@gt106551 gt106551 requested a review from sugan2416 November 23, 2023 11:29
@sugan2416 sugan2416 merged commit b4468b1 into main Nov 24, 2023
@sugan2416 sugan2416 deleted the Terra-tag-SR-issue branch November 24, 2023 05:40
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants