FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(docs): Fix a11y issues in Documentation by jessiehuff · Pull Request #2634 · patternfly/patternfly-react · GitHub

fix(docs): Fix a11y issues in Documentation - #2634

Merged
jschuler merged 6 commits into
patternfly:masterfrom
jessiehuff:fix/accessibilityDocs
Aug 9, 2019
Merged

fix(docs): Fix a11y issues in Documentation#2634
jschuler merged 6 commits into
patternfly:masterfrom
jessiehuff:fix/accessibilityDocs

Conversation

Copy link
Copy Markdown
Contributor

Fix accessibility issues in Accordion, ClipboardCopy, and DataList

Fixes patternfly/patternfly-org#1311
Fixes patternfly/patternfly-org#1310
Fixes patternfly/patternfly-org#1305

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://patternfly-react-pr-2634.surge.sh

jessiehuff added the A11y label Aug 2, 2019

jenny-s51 left a comment
edited
Loading

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Hi Jessie, your changes are looking good! There's a small thing that axe doesn't seem to like about the id of the first clipboard copy example, since it matches the title ... Looks like a small fix so I was going to try to find it myself and add it to your PR, but I looked around all three patternfly repos and I'm not sure where the ID for the first example is declared. Do you have any idea where this might be happening?

jessiehuff commented Aug 8, 2019
edited
Loading

Copy link
Copy Markdown
Contributor Author

Hey Jenny, thanks for taking a look! So from what I can tell, I believe in org we have AutoLinkHeaders that set the id. So in the mdxPF4Template.js and index.js there is an AutoLinkHeader that generates the size, className, id, content, etc. It does this from the AutoLinkHeader.js file. For the other PR I had on unique org ids, I had to pass a suffix to the AutoLinkHeader to add that to the id and differentiate them. With this issue, it looked like it was with what was being pulled from patternfly-react so I changed the aria-controls in ClipboardCopyToggle.tsx. That's been my thinking up until this point anyway. :)

Copy link
Copy Markdown
Contributor

@jessiehuff That makes sense. Thank you for clarifying! Just out of curiosity (and for future reference), is aria-controls somehow modifying the value of the id there?

jenny-s51 self-requested a review August 8, 2019 17:27
jessiehuff force-pushed the fix/accessibilityDocs branch from 22f7a4e to a7530fb Compare August 8, 2019 18:22

Copy link
Copy Markdown
Contributor Author

@jenny-s51 aria-controls provide a relation between a parent element and a child element (the toggle's button in this case). The reason I think it needed to be changed here is because otherwise we get the issue: "ARIA attributes must conform to valid values" basically pointing out that we need to pass the correct information to screen readers. This article seems to give a good summary of aria-controls. :)

jschuler merged commit b0d29a3 into patternfly:master Aug 9, 2019

Copy link
Copy Markdown
Collaborator

Your changes have been released in:

  • @patternfly/react-core@3.84.1
  • @patternfly/react-docs@4.9.27
  • @patternfly/react-inline-edit-extension@2.9.72
  • demo-app-ts@2.17.1
  • @patternfly/react-table@2.16.11
  • @patternfly/react-topology@2.7.20
  • @patternfly/react-virtualized-extension@1.1.106

Thanks for your contribution! 🎉

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

4 participants


Back | FazBrowse Home | New Git URL