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

Handling Author Errors: form & region roles #1683

Merged
merged 3 commits into from
Apr 15, 2022
Merged

Handling Author Errors: form & region roles #1683

merged 3 commits into from
Apr 15, 2022

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Jan 23, 2022

closes #1083

adds initial draft content to the handling author error section to call out expected behavior for form and region landmark roles which have not been provided accessible names.


Diff

closes #1083

adds initial draft content to the handling author error section to call out expected behavior for `form` and `region` landmark roles which have not been provided accessible names.
@carmacleod carmacleod self-requested a review January 27, 2022 18:13
@smhigley smhigley self-requested a review January 27, 2022 18:14
smhigley
Copy link
Contributor

@smhigley smhigley left a comment

Choose a reason for hiding this comment

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

For form, this looks like a substantive change from what happens currently. It looks like <div role="form"> is still exposed as a form landmark even without a name (checked Firefox and Chromium on this quick example: https://jsfiddle.net/py96hL7b/, and Safari appears to map to Group whether named or not).

Is that something we actually want to change? Out of all landmarks with name required, I can most see form being valuable to expose anyway.

@scottaohara
Copy link
Member Author

Fair point. The intent here was to align how HTML AAM treats unnamed <form>.

If we do not want to make this change then this is really just to better specify what happens with region, and arguably that could just be part of the definition of that role, since it'd be unique to that one alone.

@smhigley
Copy link
Contributor

To be fair, aligning to an unnamed <form> also makes sense. I'm not really against either approach, maybe we should just make sure browser folks are on board with updating the mappings?

@scottaohara
Copy link
Member Author

Adding agenda label to hopefully get this quickly resolved.

Solutions - keep PR as is if people agree that an unnamed form role should behave like HTML's <form> and not be exposed if unnamed. Webkit mapping to group seems odd regardless.

Alternative, we decide that form if not named should still show up as a landmark (in which case, is it really required to name it???). But if so, then maybe this PR changes to note region's behavior solely within the region definition. Not sure if we need to call this out in handling authors errors if it's behavior just for this one landmark.

@scottaohara
Copy link
Member Author

TODO: make sure that this PR indicates that the fallback role for the element is what is to be exposed AND if someone were to do <el role='form article'> that the fallback role in the role attribute would be respected.

@MelSumner MelSumner self-requested a review March 3, 2022 18:33
@jnurthen jnurthen requested review from MelSumner and removed request for carmacleod and MelSumner March 3, 2022 18:33
@scottaohara
Copy link
Member Author

@MelSumner I have finished my TODO, so this is ready to review again.

@cookiecrook I added you as a reviewer as it was your comment (if i recall correctly) that prompted me to add the new bits to this PR. If you do not wish to review, please ignore.

MelSumner
Copy link
Contributor

@MelSumner MelSumner left a comment

Choose a reason for hiding this comment

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

As an aside, I wonder if browsers could add some sort of warning to the console log. 🤔

Anyway, thank you for doing this work

@scottaohara
Copy link
Member Author

question, but should I also update the form and region roles following text:

landmarks.

to

landmarks.

bold "named" for emphasis, but not because i think it should be bold

@smhigley
Copy link
Contributor

smhigley commented Mar 7, 2022

@scottaohara that sounds like a good idea to me 👍

@scottaohara
Copy link
Member Author

thanks @smhigley. added some words to those lines for each role.

@chlane
Copy link
Contributor

chlane commented Mar 9, 2022

I agree with this change. If a form exists, it probably represents the purpose of the page and AT users should at least understand they are interacting with a form, even if it is unnamed. Anonymous regions aren't perfect but they still can provide a sense of structure for AT users.

@pkra pkra self-assigned this Apr 7, 2022
@pkra pkra merged commit 47db8e8 into main Apr 15, 2022
@pkra pkra deleted the so-issue-1083 branch April 15, 2022 16:29
github-actions bot added a commit that referenced this pull request Apr 15, 2022
SHA: 47db8e8
Reason: push, by @pkra

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@pkra pkra added this to the ARIA 1.3 milestone Jul 22, 2022
jnurthen pushed a commit that referenced this pull request Oct 10, 2023
closes #1083

* adds initial draft content to the handling author error section to call out expected behavior for `form` and `region` landmark roles which have not been provided accessible names.
* update section to talk about fallback and implicit role
* add mention of naming to region/form landmark sentence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add handling author errors update for unnamed region and form landmarks?
6 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