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

docs(Toolbar): accessibility polish - testing preparation #12884

Merged
merged 56 commits into from
May 4, 2020
Merged

docs(Toolbar): accessibility polish - testing preparation #12884

merged 56 commits into from
May 4, 2020

Conversation

kolaps33
Copy link
Contributor

@kolaps33 kolaps33 commented Apr 27, 2020

Description of changes

In order to give Toolbar component for testing, we should be consistent with ARIA.
https://www.w3.org/TR/wai-aria-practices-1.2/#toolbar
Apply following:

  • Use toolbar as a grouping element only if the group contains 3 or more controls.

and from role "Toolbar" itself
https://www.w3.org/TR/wai-aria-1.2/#toolbar
Apply following:

  • Authors MUST supply a label on each toolbar when the application contains more than one toolbar.

In order to fulfill these requirements above:

  • adding label for each Toolbar on the page
  • adding more items to the Toolbar at least Toolbar contains 3 items

Focus areas to test

(optional)

Microsoft Reviewers: Open in CodeFlow

return (
<Toolbar
aria-label="Toolbar can contain a radio group in a menu"
items={[
toolbarItem('underline', <UnderlineIcon />),
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: To be honest, I would just spread objects here. From client's perspective it's much easier to just go trough the items object, instead of seeing what the function that is invoked is doing...

Copy link
Contributor

Choose a reason for hiding this comment

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

Would be much more readable :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed :)

description="Toolbar item can open a menu which can contain radio groups."
examplePath="components/Toolbar/Content/ToolbarExampleMenuRadioGroup"
/>
<ComponentExample
title="Toolbar can contain a submenu in a menu"
toolbarAriaLabel="Example Toolbar can contain a submenu in a menu"
Copy link
Contributor

Choose a reason for hiding this comment

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

Shuoldn't this be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch thank you :)

@@ -7,6 +7,7 @@ const Performance = () => (
<ExampleSection title="Performance">
<ComponentPerfExample
title="Custom styled"
toolbarAriaLabel="Example performance"
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we still need this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good catch thank you :)

@kolaps33 kolaps33 merged commit 7cb675d into microsoft:master May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fluent UI react-northstar (v0) Work related to Fluent UI V0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants