Skip to content

UnderlineNav2: Accessibility remediations (Take   out of JS template literals) - #2603

Merged
broccolinisoup merged 1 commit into
mainfrom
UnderlineNav-sign-off-review-final-impr
Nov 22, 2022
Merged

UnderlineNav2: Accessibility remediations (Take   out of JS template literals)#2603
broccolinisoup merged 1 commit into
mainfrom
UnderlineNav-sign-off-review-final-impr

Conversation

@broccolinisoup

@broccolinisoupbroccolinisoup commented Nov 22, 2022

Copy link
Copy Markdown
Member

This PR addresses an issue came from accessibility sign-off review.

The Problem

<VisuallyHidden>{`&nbsp;(${counter})`}</VisuallyHidden>

It turns out, when non-breaking spaces are rendered within JS template literals, they are not treated as escaped characters in HTML.

The Solution

I took the non-breaking spaces out of the template literals and it seems that resolved the issue.

<VisuallyHidden>&nbsp;{`(${counter})`}</VisuallyHidden>

And MacOS VoiceOver announces the spacing properly.

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@broccolinisoup
broccolinisoup requested review from a team and mperrottiNovember 22, 2022 02:43
@changeset-bot

changeset-botBot commented Nov 22, 2022

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b0f0fa4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@primer/reactPatch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions

github-actionsBot commented Nov 22, 2022

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js78.92 KB (0%)
dist/browser.umd.js79.55 KB (0%)

@broccolinisoup
broccolinisoup temporarily deployed to github-pages November 22, 2022 02:51 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-2603 November 22, 2022 02:51 Inactive
@broccolinisoup
broccolinisoupforce-pushed the UnderlineNav-sign-off-review-final-impr branch from 201eb86 to b0f0fa4CompareNovember 22, 2022 06:36
@broccolinisoup
broccolinisoup temporarily deployed to github-pages November 22, 2022 06:42 Inactive
@github-actions
github-actionsBottemporarily deployed to storybook-preview-2603 November 22, 2022 06:42 Inactive

@siddharthkpsiddharthkp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense!

@broccolinisoup
broccolinisoup merged commit 22059e9 into mainNov 22, 2022
@broccolinisoup
broccolinisoup deleted the UnderlineNav-sign-off-review-final-impr branch November 22, 2022 23:24
@primer-cssprimer-css mentioned this pull request Nov 22, 2022
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@broccolinisoup@siddharthkp