Skip to content

♿ TetraLogical: P1 components accessibility review#31208

Closed
TetraLogicalHelpdesk wants to merge 18 commits intoampproject:mainfrom
TetraLogical:tetralogical-documentation-phase1
Closed

♿ TetraLogical: P1 components accessibility review#31208
TetraLogicalHelpdesk wants to merge 18 commits intoampproject:mainfrom
TetraLogical:tetralogical-documentation-phase1

Conversation

@TetraLogicalHelpdesk
Copy link
Copy Markdown
Contributor

Suggested changes and additions based on the TetraLogical accessibility review commissioned by @nainar / @caroqliu

x-ref ampproject/amp.dev#4972

As menus in the sidebar are not strictly ARIA menus (but can have a variety of content), they should not have menu-like behaviour.

#31175

The behaviour also seems to be currently suppressed (I seem to recall an issue from phase 0 that called for it to be removed, if I'm not mistaken)
The HTML markup list seems to suppress rendering of the backtick code markup - see https://amp.dev/documentation/components/amp-selector/#keyboard-select-mode
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Nov 17, 2020

CLA assistant check
All committers have signed the CLA.

@TetraLogicalHelpdesk TetraLogicalHelpdesk changed the title ♿ TetraLogical: P0 components accessibility review ♿ TetraLogical: P1 components accessibility review Nov 17, 2020
@amp-owners-bot amp-owners-bot bot requested a review from dvoytenko November 17, 2020 14:58
@amp-owners-bot
Copy link
Copy Markdown

amp-owners-bot bot commented Nov 17, 2020

Hey @alanorozco! These files were changed:

build-system/server/app-index/amphtml-helpers.js

Hey @ampproject/wg-caching! These files were changed:

extensions/amp-3d-gltf/0.1/test/validator-amp-3d-gltf.html
extensions/amp-3d-gltf/0.1/test/validator-amp-3d-gltf.out
extensions/amp-access-laterpay/0.1/test/validator-amp-access-laterpay.html
extensions/amp-access-laterpay/0.1/test/validator-amp-access-laterpay.out
extensions/amp-access-laterpay/0.2/test/validator-amp-access-laterpay.html
extensions/amp-access-laterpay/0.2/test/validator-amp-access-laterpay.out
extensions/amp-access-poool/0.1/test/validator-amp-access-poool.html
extensions/amp-access-poool/0.1/test/validator-amp-access-poool.out
extensions/amp-access-scroll/0.1/test/validator-amp-access-scroll.html
extensions/amp-access-scroll/0.1/test/validator-amp-access-scroll.out
extensions/amp-access/0.1/test/validator-amp-access-missing-extension.html
extensions/amp-access/0.1/test/validator-amp-access-missing-extension.out
+370 more

Hey @gmajoulet! These files were changed:

extensions/amp-story-360/0.1/test/validator-amp-story-360.html
extensions/amp-story-360/0.1/test/validator-amp-story-360.out
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-poll.html
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-poll.out
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-quiz.html
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-quiz.out
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-results.html
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-results.out
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-valid.html
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-valid.out
extensions/amp-story-player/0.1/test/validator-amp-story-player.html
extensions/amp-story-player/0.1/test/validator-amp-story-player.out
+59 more

Hey @processprocess, @t0mg! These files were changed:

extensions/amp-story-360/0.1/test/validator-amp-story-360.html
extensions/amp-story-360/0.1/test/validator-amp-story-360.out

Hey @mszylkowski! These files were changed:

extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-poll.html
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-poll.out
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-quiz.html
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-quiz.out
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-results.html
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-results.out
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-valid.html
extensions/amp-story-interactive/0.1/test/validator-amp-story-interactive-valid.out

Hey @newmuis, @Enriqe! These files were changed:

extensions/amp-story-player/0.1/test/validator-amp-story-player.html
extensions/amp-story-player/0.1/test/validator-amp-story-player.out
extensions/amp-story/1.0/test/validator-amp-story-360.html
extensions/amp-story/1.0/test/validator-amp-story-360.out
extensions/amp-story/1.0/test/validator-amp-story-amp-experiment-error.html
extensions/amp-story/1.0/test/validator-amp-story-amp-experiment-error.out
extensions/amp-story/1.0/test/validator-amp-story-amp-experiment.html
extensions/amp-story/1.0/test/validator-amp-story-amp-experiment.out
extensions/amp-story/1.0/test/validator-amp-story-amp-twitter-error.html
extensions/amp-story/1.0/test/validator-amp-story-amp-twitter-error.out
extensions/amp-story/1.0/test/validator-amp-story-amp-twitter.html
extensions/amp-story/1.0/test/validator-amp-story-amp-twitter.out
+49 more

@TetraLogicalHelpdesk
Copy link
Copy Markdown
Contributor Author

Note that the find/replace change to add lang="en" to all relevant instances of the demos may have been overzealous in places. Apologies if it turns out to be excessive.

@nainar
Copy link
Copy Markdown
Contributor

nainar commented Nov 17, 2020

@caroqliu to kick of the review?

Copy link
Copy Markdown
Contributor

@caroqliu caroqliu left a comment

Choose a reason for hiding this comment

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

Thanks for your thorough changes @patrickhlauke! Left a few comments.

| -->
| <!doctype html>
| <html ⚡>
| <html ⚡lang="en">
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.

Please update all .out files by running gulp validator --update_tests and do not manually modify.

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.

i'm currently unable to get a working local dev environment up and running for this (some quirk of windows/wsl/ubuntu that's beyond my technical ability to hunt down just now). is it ok to leave these as they are in my PR, and for you to re-update them properly at your end?

<amp-img src="image1" width="200" height="100"></amp-img>
<amp-img src="image1" width="200" height="100"></amp-img>
<amp-img src="image1" width="200" height="100"></amp-img>
<amp-img src="image1" width="200" height="100" alt="Image 1"></amp-img>
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.

FMI: Is this type of alt description actually useful?

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.

Only in this instance where it's a placeholder image, to be honest. Deemed it borderline acceptable, mainly due to the sheer number of these sorts of images without alt at all (and the fact that not all of the instances I spotted were easy to find/replace throughout). This sort of thing is certainly more of a stopgap solution - ideally, all examples should have appropriate/more real-world descriptive alternative text.

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.

Makes sense, thank you

`select`: Tab key gives focus to `<amp-selector>`. The selection changes as the user navigates options with arrow keys.
</li>
</ul>
- `none` (default): The tab key changes focus between items in the `<amp-selector>`. The user must press enter or space to change the selection. Arrow keys are disabled.
Copy link
Copy Markdown
Contributor

@caroqliu caroqliu Nov 18, 2020

Choose a reason for hiding this comment

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

@CrystalOnScript Is this HTML removal acceptable for amp.dev?

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.

note that currently, with the html there, it seems amp.dev doesn't then correctly render the backticks and shows them as literal content on the page - see https://amp.dev/documentation/components/amp-selector/#keyboard-select-mode

image

@@ -216,10 +216,6 @@ Please see [this example file](https://github.com/ampproject/amphtml/blob/master

`<amp-sidebar>` supports drilldown (nested) menus through a child component named [`<amp-nested-menu>`](../../amp-nested-menu/amp-nested-menu.md). With `<amp-nested-menu>`, `<amp-sidebar>` can support nesting one or more layers of submenus (and transition between them) as demonstrated by the following example:

[tip type="note"]
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.

FMI: Does this not actually improve accessibility and keyboard support? Is there anything that needs to be done to improve user supplied content for this component?

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.

it's unclear to me what actually happens (as i've not reviewed the logic behind amp-nested-menu). I assumed there was some intended menu-like behaviour being tied to <li> (allowing cursor keys to be used), which is what would not be appropriate. what is the actual outcome of doing what the tip suggests?

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.

bringing up https://playground.amp.dev/?url=https%3A%2F%2Fpreview.amp.dev%2Fdocumentation%2Fcomponents%2Famp-sidebar.example.1.html%3Fformat%3Dwebsites&format=websites and manually removing the <ul> and <li> elements inside that nested menu seems to not have any tangible effect on the outcome (things are still turned into keyboard-focusable role="button" elements regardless.

if there was some intended extra cursor key behaviour, it's not there in the demo/broken?

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.

I'm not too sure, maybe @nainar can weigh in from having participated in design conversations? I assumed it was encouraging use of semantic HTML for a list of items as opposed to non-meaningful tags i.e. <div>, but if this does not improve UX, we don't need to encourage people to do this.

@patrickhlauke
Copy link
Copy Markdown
Contributor

thanks @caroqliu ... yeah, the dangers of find/replace (also, on my Windows system at least, it's really tricky to tell visually when the ⚡ has a space after it or not ... should have caught that though). I'll do a second pass of this tonight to address the cases you spotted there

@amp-bundle-size amp-bundle-size bot requested a review from jridgewell November 18, 2020 20:28
@banaag banaag self-requested a review November 23, 2020 23:05
Copy link
Copy Markdown
Contributor

@banaag banaag left a comment

Choose a reason for hiding this comment

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

LGTM as per validator related changes.

<amp-img src="image1" width="200" height="100"></amp-img>
<amp-img src="image1" width="200" height="100"></amp-img>
<amp-img src="image1" width="200" height="100"></amp-img>
<amp-img src="image1" width="200" height="100" alt="Image 1"></amp-img>
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.

Makes sense, thank you

Copy link
Copy Markdown
Contributor

@caroqliu caroqliu left a comment

Choose a reason for hiding this comment

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

Thanks so much for your diligence and thoroughness here! Looks like there are a couple merge conflicts - once those are resolved and tests are healthy I'd be happy to sign off.

they were causing merge conflicts, and not sure if it's all that important for these to have `lang="en"`
@TetraLogicalHelpdesk
Copy link
Copy Markdown
Contributor Author

Thanks so much for your diligence and thoroughness here! Looks like there are a couple merge conflicts - once those are resolved and tests are healthy I'd be happy to sign off.

I've resolved the merge conflicts by resetting the validator/testdata files (as noted above, I'm currently unable to sort out a working build environment for some reason, with obscure WSL errors, so can't actually run the tests, nor generate the .out files correctly). assuming that the presence or not of lang="en" in the test files is not mission-critical for testing the actual functionality/running the test suite. If you feel these should be changed too, let me know and I can try and craft a more specific change, just affecting the .html files (and leave updating the .out files as an exercise that can hopefully be done at your end?)

Copy link
Copy Markdown
Contributor

@caroqliu caroqliu left a comment

Choose a reason for hiding this comment

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

I've resolved the merge conflicts by resetting the validator/testdata files (as noted above, I'm currently unable to sort out a working build environment for some reason, with obscure WSL errors, so can't actually run the tests, nor generate the .out files correctly). assuming that the presence or not of lang="en" in the test files is not mission-critical for testing the actual functionality/running the test suite. If you feel these should be changed too, let me know and I can try and craft a more specific change, just affecting the .html files (and leave updating the .out files as an exercise that can hopefully be done at your end?)

With regards to the build environment, what kind of errors are you seeing? Do you mind filing a follow up issue, or would you like help debugging more actively via Slack? cc @rsimha as FYI

As for the validator tests, the validator is stringent down to the character, so the addition of lang=en in an input file and not the output file (or vice versa) will cause tests to fail. For now, I'd recommend to not modify .html validator files if their corresponding.out files cannot be updated according to those change in the same PR. cc @banaag for another look in light of these removals/updates.

</body></html>`,

adTemplate: `<!doctype html><html ⚡ lang="en"><head><meta charset="utf-8"><link rel="canonical" href="self.html" /><meta name="viewport" content="width=device-width,minimum-scale=1"><style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript><script async src="https://cdn.ampproject.org/v0.js"></script><script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.1.js"></script>
adTemplate: `<!doctype html><html ⚡><head><meta charset="utf-8"><link rel="canonical" href="self.html" /><meta name="viewport" content="width=device-width,minimum-scale=1"><style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript><script async src="https://cdn.ampproject.org/v0.js"></script><script async custom-template="amp-mustache" src="https://cdn.ampproject.org/v0/amp-mustache-0.1.js"></script>
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.

Please also reset minifiedTemplateCreative in this same file.

@amaltas
Copy link
Copy Markdown
Contributor

amaltas commented Nov 30, 2020

Can you try updating tests (.out files) using the instructions at: https://github.com/ampproject/amphtml/tree/master/validator#usage

@TetraLogicalHelpdesk
Copy link
Copy Markdown
Contributor Author

Sorry, only just revisiting this (as we're working on another phase of these reviews), and I see that this got stalled at the time and is now conflicting. Is anybody able to help get this updated and merged?

@caroqliu
Copy link
Copy Markdown
Contributor

Sorry, only just revisiting this (as we're working on another phase of these reviews), and I see that this got stalled at the time and is now conflicting. Is anybody able to help get this updated and merged?

@TetraLogicalHelpdesk I spent some time this morning taking a stab at resolving the merge conflicts -- that led to this change which includes all the intermediary commits. I'm not confident that creating a secondary pull request into this working branch is the best way to go about it, but the most important part is the diff in the last two commits - one (8c14d45) which resolves merge conflicts after merging with fresh master, and the other (545bfba) which persists one of the original changes to the file's new location.

Hopefully you can execute the merge with the following recommendations above as reference if needed. Otherwise please please find me (Caroline Liu) on the AMP Slack and we can hopefully resolve this in live time together.

Finally, one recommendation going forward could be to break this PR up so the majority of changes aren't stalled by recent changes in the codebase to a few others. The most obvious is to separate the lang="en" additions from the handful of documentation changes, but another could also be to fragment the set of lang="en" additions as well by a few directories in the repo at a time.

@patrickhlauke
Copy link
Copy Markdown
Contributor

@patrickkettner not sure if this falls into your area, but wondering if you'd be able to help push this over the line? for context, this was done as part of an audit/review in november, and i've since been on other projects (so had no time allocated to nurse this PR further). i'm also far from being a wizard with git, as evidenced by my "let's just make it one giant PR" approach here.

@patrickhlauke
Copy link
Copy Markdown
Contributor

After wrapping my head around this, I managed to work out what the actual steps required were. thank you @caroqliu for doing the hard work with to resolve the conflicts ... once I worked out that all that was needed was for me to merge that work back into our branch and then push it back up, it all went smoothly. Sorry for sounding the "not a git expert" alarm bell, @patrickkettner. I think this should now be mergeable.

@patrickkettner
Copy link
Copy Markdown
Contributor

sorry I missed the ping, @patrickhlauke 🤦‍♂️ - great job!

Copy link
Copy Markdown
Contributor

@kristoferbaxter kristoferbaxter left a comment

Choose a reason for hiding this comment

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

That's a whole lot of lang attributes. Thanks for the fixes!

@patrickhlauke
Copy link
Copy Markdown
Contributor

That's a whole lot of lang attributes

yes, sorry...the joy/pain of doing a fairly global find and replace :)

@antiphoton antiphoton added the WG: Caching: Triaged Initial triage from wg-caching complete. Remove label if new input required. label Apr 12, 2021
@twifkak twifkak removed their request for review April 22, 2021 19:29
@caroqliu
Copy link
Copy Markdown
Contributor

caroqliu commented Jun 7, 2021

Looks like this PR has fallen behind a few merge conflicts. Anything I can do to help get this through? @TetraLogicalHelpdesk @patrickhlauke

@TetraLogicalHelpdesk
Copy link
Copy Markdown
Contributor Author

Looks like this PR has fallen behind a few merge conflicts. Anything I can do to help get this through? @TetraLogicalHelpdesk @patrickhlauke

Hi @caroqliu, it's probably best at this stage (since the project relating to this was closed quite some time ago) if somebody on your side could shepherd this PR through to completion. Alternatively, we can add some extra time to the next AMP-related project to take care of this? Let us know how you'd like to proceed.

@Gregable
Copy link
Copy Markdown
Member

@kristoferbaxter for triage, unclear what should be done with this old PR

@jridgewell jridgewell removed their request for review August 31, 2022 21:02
@stale
Copy link
Copy Markdown

stale bot commented Sep 17, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale Inactive for one year or more label Sep 17, 2023
@stale stale bot closed this Oct 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Related to: Accessibility Stale Inactive for one year or more WG: Caching: Triaged Initial triage from wg-caching complete. Remove label if new input required. WG: caching

Projects

None yet

Development

Successfully merging this pull request may close these issues.