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

Addon-a11y: Highlight all elements correctly #14935

Merged
merged 1 commit into from
May 25, 2021
Merged

Conversation

yannbf
Copy link
Member

@yannbf yannbf commented May 14, 2021

Issue: Couldn't find an open issue for this

What I did

There was an extra curly bracket in the css for highlighting elements in the a11y addon, that resulted in a broken stylesheet.

Before:
image

After:
image

How to test

Build the addon and run any storybook, then toggle all elements to see the difference

yarn build addon-a11y
yarn start

Or check the chromatic build and test it there as well!

  • Is this testable with Jest or Chromatic screenshots? no
  • Does this need a new example in the kitchen sink apps? no
  • Does this need an update to the documentation? no

If your answer is yes to any of these, please make sure to include it in your PR.

@nx-cloud
Copy link

nx-cloud bot commented May 14, 2021

Nx Cloud Report

CI ran the following commands for commit 25bbcae. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch

Status Command
#000000 nx run-many --target=prepare --all --parallel --max-parallel=15

Sent with 💌 from NxCloud.

@@ -21,9 +21,12 @@ const highlight = (infos: HighlightInfo) => {
const id = HIGHLIGHT_STYLE_ID;
resetHighlight();

// Make sure there are no duplicated selectors
const elements = Array.from(new Set(infos.elements));
Copy link
Member Author

Choose a reason for hiding this comment

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

I noticed that sometimes the elements array would be of size 20, but actually 10 of these selectors would be just duplicated, resulting in a longer stylesheet than necessary

@shilman shilman changed the title fix(addon-a11y): highlight all elements correctly Addon-a11y: Highlight all elements correctly May 14, 2021
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM!

@shilman shilman merged commit 878694e into next May 25, 2021
@shilman shilman deleted the fix/a11y-highlight branch May 25, 2021 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants