Skip to content

fix(feedback) Improve accessibility for user feedback - #24151

Merged
markstory merged 4 commits into
masterfrom
fix/feedback-accessibility
Mar 2, 2021
Merged

markstory merged 4 commits into
masterfrom
fix/feedback-accessibility

Conversation

@markstory

Copy link
Copy Markdown
Member
  • Add missing aria attributes to help screenreaders.
  • Add tab/focus trapping to help keyboard users.
  • Make close button able to receive tab focus.

Fixes #23288

* Add missing aria attributes to help screenreaders.
* Add tab/focus trapping to help keyboard users.
* Make `close` button able to receive tab focus.

Fixes #23288
};

for (i = 0; i < linkTags.length; i++) {
if (linkTags[i].className === 'close') {

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.

nice cleanup, that's some wonky code

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Looks like a getElementsByClassName() from before that was a thing.

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.

Might have been a browser compatibly thing. Since this is a piece of code that needs to be highly compatible

setTimeout(function () {
firstFocus.focus();
}, 1)
}

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.

Clever way to trap focus, feels like the browser should have something built in for this.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I wish there was a built-in way.

@github-actions

github-actions Bot commented Mar 1, 2021 •

Copy link
Copy Markdown
Contributor

size-limit report

Path Base Size (e365a6e) Current Size Change
public/app.js 319.77 KB 320 KB +0.08% 🔺
public/vendor.js 630.7 KB 630.73 KB +0.01% 🔺
public/sentry.css 25.77 KB 25.77 KB 0%

Our new CI pipelines don't allow parse errors in the files anymore so
I've reused the technique we used on other interpolated values with
`strings`. I've also applied our formatting rules to the embed js
@markstory

Copy link
Copy Markdown
Member Author

/gcbrun

@markstory
markstory merged commit 6c878d3 into master Mar 2, 2021
@markstory
markstory deleted the fix/feedback-accessibility branch March 2, 2021 19:58
@BYK BYK mentioned this pull request Mar 4, 2021
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 18, 2021

This branch was successfully deployed

2 active deployments
Preview – storybook — 995f8e5b Deployed Mar 2, 2021 by vercel[bot]
Preview – sentry — 995f8e5b Deployed Mar 2, 2021 by vercel[bot]
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.

Accessibility Issues with User Feedback Widget

3 participants