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

Tabs Examples: Improve high contrast support and code quality #2194

Merged
merged 52 commits into from
Mar 22, 2022

Conversation

jongund
Copy link
Contributor

@jongund jongund commented Jan 4, 2022

Tab example updates include:

  • Updating js code to use latest coding standards
  • Updated keyboard focus styling for high contrast modes
  • Updated visual affordance for selected tab in high contrast modes
  • Included in examples when tabindex=0 should be used with role=tabpanel
  • Removed delete tab feature
  • Added additional tabs to increase the utility of Home and End key behavior

tab example with automatic activation

tab example with manual activation


Preview | Diff

examples/tabs/tabs-automatic.html Outdated Show resolved Hide resolved
examples/tabs/tabs-automatic.html Outdated Show resolved Hide resolved
@jongund jongund requested a review from mcking65 January 5, 2022 16:37
Copy link
Contributor

@carmacleod carmacleod left a comment

Choose a reason for hiding this comment

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

@jongund This is looking really good! I did functional testing and editorial testing. Have not done accessibility testing, but I will. I think it's important not to support Up and Down arrow keys in a horizontal tablist. Users like to use Up/Down arrows to scroll the page, and it can be disorienting if those keys are taken by a horizontal tab control.

Edit: Yes, as you mentioned in the call, the pattern explicitly says:

If the tab list is horizontal, it does not listen for Down Arrow or Up Arrow so those keys can provide their normal browser scrolling functions even when focus is inside the tab list.

examples/tabs/tabs-automatic.html Outdated Show resolved Hide resolved
examples/tabs/tabs-manual.html Outdated Show resolved Hide resolved
examples/tabs/js/tabs-automatic.js Outdated Show resolved Hide resolved
examples/tabs/js/tabs-automatic.js Outdated Show resolved Hide resolved
examples/tabs/js/tabs-manual.js Outdated Show resolved Hide resolved
examples/tabs/js/tabs-manual.js Outdated Show resolved Hide resolved
@mcking65
Copy link
Contributor

mcking65 commented Mar 2, 2022

@jongund, I've finished editorial checks and corrections. There is one change in the example code itself that I didn't make (heading level comment above).

Please carefully examine my changes to accessibility features documentation in particular to ensure I didn't unintentionally change meaning and introduce an inaccuracy.

I requested re-review from @ZoeBijl since @ZoeBijl previously requested changes. I am having a hard time following the thread to determine which comments are resolved. @ZoeBijl, if your feedback is resolved, please change your review status to approve.

Also, @jnurthen , please confirm Jon's fix to the issue you reported during today's meeting is resolved.

@jongund
Copy link
Contributor Author

jongund commented Mar 2, 2022

@mcking65 @jnurthen
Your changes in documentation look good to me. The change in the top border width of the active tab should also satisfy James's report of the active tab being easily identifiable in high contrast modes.

@jongund
Copy link
Contributor Author

jongund commented Mar 2, 2022

@mcking65
Updated the heading to use H3 instead of h2.

@ZoeBijl
Copy link
Contributor

ZoeBijl commented Mar 8, 2022

@mcking65 I’ll re-review with a fresh pair of eyes. While I might not agree with the visual changes; that’s more a personal thing than an APG thing so I’ll let that go. Should be done this week.

Copy link
Contributor

@ZoeBijl ZoeBijl left a comment

Choose a reason for hiding this comment

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

The changes are fine. I still don’t agree with a lot of it but I’ll leave that for another time.

@@ -0,0 +1,136 @@
/*
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you elaborate?

@mcking65 mcking65 changed the title updated tabs examples Tabs Examples: Improve high contrast support and code quality Mar 22, 2022
Copy link
Contributor

@mcking65 mcking65 left a comment

Choose a reason for hiding this comment

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

Editorial review complete. We are ready to ship!!
Thank you to all who helped, especially @jongund!

Also, this is a special pull request as it contains significant input from @carmacleod. Thank you Carolyn! We miss you! We honor the wonderful role you played in our lives and in the world of accessibility!

@mcking65 mcking65 added QA for APG Examples Related to improve the quality and the acceptance of APG examples Code Quality Non-functional code changes to satisfy APG code style guidelines and linters labels Mar 22, 2022
@mcking65 mcking65 added this to the Launch Redesigned APG milestone Mar 22, 2022
@mcking65 mcking65 added QA for APG Examples Related to improve the quality and the acceptance of APG examples Code Quality Non-functional code changes to satisfy APG code style guidelines and linters and removed QA for APG Examples Related to improve the quality and the acceptance of APG examples Code Quality Non-functional code changes to satisfy APG code style guidelines and linters labels Mar 22, 2022
@mcking65 mcking65 merged commit d324b85 into main Mar 22, 2022
@mcking65 mcking65 deleted the tablist-update branch March 22, 2022 16:23
michael-n-cooper pushed a commit that referenced this pull request May 9, 2022
…2194)

This commit updates the two examples of the tabs design pattern by:
* Improving support for high contrast settings by changing how keyboard focus and the selected state are rendered.
* Improving clarity of guidance related to focusability of tab panels; one example illustrates focusable tab panels and the other illustrates omitting the panel from the page tab sequence.
* Reducing complexity by removing the delete tab feature; this advanced functionality may later be illustrated in a separate example.
* Improving documentation of accessibility features.
* Updating Javascript and CSS to implement practices specified in the latest APG Code Guide.

Co-authored-by: Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>
Co-authored-by: Matt King <a11yThinker@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Quality Non-functional code changes to satisfy APG code style guidelines and linters QA for APG Examples Related to improve the quality and the acceptance of APG examples
Development

Successfully merging this pull request may close these issues.

10 participants