-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Feature/highlight a11y violation on component #6218
Feature/highlight a11y violation on component #6218
Conversation
Merging Storybook Next into fork
# Conflicts: # addons/a11y/src/components/A11YPanel.tsx
…gles are set to true a user should be able to set the parent toggle to true and make all subs true (with intervention)
…assed in type value
… into the tab row
…://github.com/CodeByAlex/storybook into feature/highlight-a11y-violation-on-component # Conflicts: # yarn.lock
…eature/highlight-a11y-violation-on-component-merge # Conflicts: # addons/a11y/package.json # addons/a11y/src/components/A11YPanel.tsx # addons/a11y/src/components/Report/index.tsx
Thanks @domyen! Thanks for the feedback. I'll make sure that the "Highlight results" and checkbox are vertically centered and uncapitalize "results". My only concern about aligning the checkboxes to the right would be in scenario where someone uses a wide screen. It may be hard to determine which checkbox is associated with which rule (one above or below in most cases). What do you think? |
👍 We can solve this by showing the boundaries of the row: The right hand alignment makes the highlight checkbox a bit less distracting. After all the goal is to communicate the rules not that there's a checkbox. :) And while we're here:
You're a legend @CodeByAlex 🙏 🙇 One more thing
|
I like that a lot @domyen, it looks a lot cleaner. Ill make that design change |
@domyen, Ive made the changes. Let me know what you think |
…igned checkbox to the right without visible label (aria-label used)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from a UI perspective
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks amazing! Great work @CodeByAlex and @domyen! Esp love the right aligned checkbox on top -- details ❤️❤️❤️ 👌 !
Since the UI has gotten complex, and it's been awhile since I used redux for state management (cc @alexandrebodin @ndelangen), here's what I'd like to see on the code side:
- Stories for the major components
- Hooked into
official-storybook
or another top-level storybook to simplify testing
This might be outside the scope of this PR, but we should probably do this for all the core addons. It bothers me to see Jest tests with snapshots when we've already built a much nicer way to do this inside Storybook.
# Conflicts: # addons/a11y/package.json # addons/a11y/src/components/__snapshots__/A11YPanel.test.js.snap # yarn.lock
@CodeByAlex can you please allow maintainers to push to your branch? I'd like to fix the merge conflicts and merge |
Sure thing @ndelangen. I checked the "Allow edits from maintainers option" so you should be good now |
Thank you! Let's get this merged, amazing feature! |
Thanks, @ndelangen! Glad you like it |
Looking great! |
Issue: #6001
What I did
I added highlight toggles for each accessibility rule and category at every level. A user can now click on the highlight checkbox and see their violation, pass, or incomplete rule highlighted in the iframe. Each type (violation, pass, or incomplete) has a corresponding color to differentiate the rule when highlighting.
Design:
Highlight-Toggle component - can take in one to many elements that it can highlight. This means that the toggle component can be placed at any level and highlight the element or elements passed in based on a switch.
Redux is being used to keep track of a global map where the key is the element itself and the value is an object containing the toggle state of the element and the original element outline so that the component isn't changed when the highlight is removed.
The highlight toggle uses the redux map to keep track of whether or not the element or elements within it are highlighted and whether or not the toggle state is true.
I worked with @domyen on the design elements for this feature to keep consistency across the app.
How to test