Skip to content

Conversation

@jongund
Copy link
Contributor

@jongund jongund commented May 12, 2020

Updated menu button examples to:

  1. Improve Javascript coding and use key rather than keyCode in keyboard events, and a single object
  2. Improved high contrast support

Preview links

Review: Menu Button for Links
Review: Menu Button for Actions
Review: Menu Button for Actions using aria-activedescendant

Review checklist

@jongund
Copy link
Contributor Author

jongund commented May 12, 2020

@zcorpan

Can you look at the test cases that are failing for the updated menu button examples?
I can't figure out why they are failing, I get passing results for most of the tests and inconsistent failures on my local MacOS and Windows 10 machine.

  1. macOS: links and aria-activedescent example all tests pass, page down, page up and end fail for actions with focus example.
  2. Windows 10: both action examples pass and there about six failures related to keystrokes for the links example.

This is driving me nuts, what don't I understand about the testing framework?

@jongund jongund mentioned this pull request Jul 14, 2020
@jongund jongund changed the title Issue1399 menubutton updates Update menubutton examples: High Contrast Support and APG Coding Practices Aug 4, 2020
@charmarkk
Copy link
Contributor

Guessing at answers, I propose the following text.

Because transparent borders are visible on some systems with operating system high contrast settings enabled, transparency cannot be used to create a visual difference between the element that is focused an other elements. Instead of using transparency, the focused element has a thicker border and less padding. When an element receives focus, its border changes from 1 to 3 pixels and padding is reduced by 2 pixels. When an element loses focus, its border changes from 3 to 1 pixels and padding is increased by 2 pixels.

The above text does not explain why we have a 1 pixel border on elements that ar not focused. Taking a wild guess at what things look like to you sightees, should we add a bullet like:

Because enabling operating system high contrast settings can remove color variations used to distinguish buttons and menu items from plain text, focusable elements are given a 1 pixel border.

I think this is a good combo/compromise, Matt!

@spectranaut
Copy link
Contributor

spectranaut commented Oct 22, 2020

All conflicts were related to new lint and prettier rules! Fixed now :)

@spectranaut spectranaut force-pushed the issue1399-menubutton-updates branch from f666e9d to Compare October 22, 2020 18:00
@jongund
Copy link
Contributor Author

jongund commented Oct 25, 2020

@mcking65
Javascript now uses class instead of prototype for defining widget object inline with new authoring practices.

@jongund
Copy link
Contributor Author

jongund commented Oct 27, 2020

@mcking65
I have updated the high contrast documentation.

@mcking65
Copy link
Contributor

mcking65 commented Nov 9, 2020

As anticipated, we have some conflicts from recent merges. @jongund, if you could help resolve, that'd be great. Otherwise, Valerie can help when she has another day on APG.

This looks pretty much ready to go. I want to make some minor grammar edits to the accessibility features documentation. Then, I'll merge.

nschonni
</ul>
<li>CSS: <a href="css/menu-button-actions.css" type="text/css">menu-button-actions.css</a></li>
<li>Javascript: <a href="js/menu-button-actions-active-descendant.js" type="text/javascript">menu-button-actions-active-descendant.js</a>
</section>

This comment was marked as outdated.

@jongund
Copy link
Contributor Author

jongund commented Nov 9, 2020

@mcking65
I fixed the conflicts, so should be ready for your edits.

mcking65
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; ready to merge!

@mcking65
Copy link
Contributor

@jongund thank you, thank you, thank you for all the hard work put into this!!!!

@mcking65 mcking65 merged commit 243f77d into master Nov 10, 2020
@mcking65 mcking65 added enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Example Page Related to a page containing an example implementation of a pattern labels Nov 10, 2020
@mcking65 mcking65 added this to the 1.2 Release 1 milestone Nov 10, 2020
@mcking65 mcking65 deleted the issue1399-menubutton-updates branch November 10, 2020 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Any addition or improvement that doesn't fix a code bug or prose inaccuracy Example Page Related to a page containing an example implementation of a pattern

Development

Successfully merging this pull request may close these issues.

Update menu button examples to improve high contrast support and js practices

8 participants

Follow Lee on X/Twitter - Father, Husband, Serial builder creating AI, crypto, games & web tools. We are friends :) AI Will Come To Life!

Check out: eBank.nz (Art Generator) | Netwrck.com (AI Tools) | Text-Generator.io (AI API) | BitBank.nz (Crypto AI) | ReadingTime (Kids Reading) | RewordGame | BigMultiplayerChess | WebFiddle | How.nz | Helix AI Assistant