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

chore(a11y): ensure SkipToContent sends focus to page content by seanforyou23 · Pull Request #2058 · patternfly/patternfly · GitHub

chore(a11y): ensure SkipToContent sends focus to page content - #2058

Merged
redallen merged 3 commits into
patternfly:masterfrom
seanforyou23:skiptocontent-doc
Jul 29, 2019
Merged

chore(a11y): ensure SkipToContent sends focus to page content#2058
redallen merged 3 commits into
patternfly:masterfrom
seanforyou23:skiptocontent-doc

Conversation

seanforyou23 commented Jul 16, 2019
edited
Loading

Copy link
Copy Markdown
Contributor

This PR swaps the target element for SkipToContent from being an anchor to being the primary page container. It requires that we supply the <main> element with `tabindex="-1" so this region can receive focus programmatically. It's related to patternfly/patternfly-react#2519

I did notice that unless a heading is an immediate child of the main container, we still don't get the headings read aloud for free when using a screen reader, however, I believe this is still a step in the right direction. The technique is described in one of the training courses over at dequeuniversity.com.

Should we do something about the new focus ring that appears as a result of focusing on the main content region?

add doc for new attribute requirements in Page, SkipToContent
update corresponding demos/exmaples
skip to content sends focus to content container

add doc for new attribute requirements in Page, SkipToContent
update corresponding demos/exmaples
skip to content sends focus to content container

patternfly-build commented Jul 16, 2019
edited
Loading

Copy link
Copy Markdown
Collaborator

Deploy preview for pf-next ready!

Built with commit fc6b63b

https://deploy-preview-2058--pf-next.netlify.com

Copy link
Copy Markdown
Contributor

thanks for doing this @seanforyou23
I think dropping the focus ring could make sense. It might be a little strange for sighted user. Although it's pretty subtle so not sure it's a big deal.

mcoker commented Jul 16, 2019

Copy link
Copy Markdown
Contributor

There are some other places we'll need to update the anchor link:

src//patternfly/demos/DataList/examples/data-list-simple-without-pagination-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/DataList/examples/data-list-simple-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/DataList/examples/data-list-expandable-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/DataList/examples/data-list-actionable-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/Table/examples/table-sortable-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/Table/examples/table-compact-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/Table/examples/table-simple-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/Table/examples/table-expandable-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/Table/examples/table-compound-expansion-demo.hbs:    <a id="main-content-{{page--id}}"></a>
src//patternfly/demos/CardView/examples/card-view-demo-example.hbs:      <a id="main-content-{{page--id}}"></a>

mcoker commented Jul 16, 2019

Copy link
Copy Markdown
Contributor

I think dropping the focus ring could make sense. It might be a little strange for sighted user.

+1. You can just add &:target { outline: 0; } in this block.

seanforyou23 requested a review from mcoker July 17, 2019 17:48

jgiardino left a comment

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

These updates look great to me, especially the documentation! Thanks for making these updates.

mcoker left a comment

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

nice!

redallen merged commit b37341d into patternfly:master Jul 29, 2019

Copy link
Copy Markdown
Collaborator

🎉 This PR is included in version 2.23.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL