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

Consider tabindex in iframe has acc name #1102

Merged
merged 5 commits into from
Feb 5, 2020
Merged

Conversation

WilcoFiers
Copy link
Member

Consider whether or not iframes are in the sequential focus navigation when dealing with accessible names. This resolves a few comments from the ACT Task Force, including #1092.

Need for Final Call: 1 week

Copy link
Contributor

@kasperisager kasperisager left a comment

Choose a reason for hiding this comment

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

The same thing applies to all rules that test for accessible names of "user interface components". I do recall discussions on this very matter previously, but I don't recall when nor where.

Jym77
Jym77 previously requested changes Jan 16, 2020
Copy link
Collaborator

@Jym77 Jym77 left a comment

Choose a reason for hiding this comment

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

A new Passed Example is needed.
Plus several small editorials.

@@ -30,18 +31,18 @@ Each target element has an [accessible name][] that is not empty (`""`).

## Assumptions

- The rule assumes that the target `iframe` is used as a [user interface component](https://www.w3.org/TR/WCAG21/#dfn-user-interface-components).
If an `iframe` is not perceived by the user as a single control, it does not qualify as a [user interface component][] under WCAG 2. In such a scenario, failing this rule would not fail [success criterion 4.1.2](https://www.w3.org/TR/WCAG21/#name-role-value). Unless the `iframe` is both removed from the accessibility tree and removed from [sequential focus navigation][], they usually are considered to be [user interface components][user interface component].
Copy link
Collaborator

Choose a reason for hiding this comment

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

I had the impression that we usually start the assumptions by "this rule assumes that".
Not a big deal, but uniformity helps.

Copy link
Member Author

Choose a reason for hiding this comment

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

I know we have quite a few rules that do, but I don't think that's a good thing. Assumptions should explain edge cases the rule does not consider, and the interpretation that is used for the requirements.

_rules/iframe-accessible-name-cae760.md Outdated Show resolved Hide resolved
@@ -132,10 +133,10 @@ Usage of `alt` attribute to describe content is not valid.

#### Failed Example 7

[Accessible name][] is empty.
This `iframe` that is part of [sequential focus navigation][] has an empty [Accessible name][].
Copy link
Collaborator

Choose a reason for hiding this comment

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

We need a similar Passed Example (not in the accessibility tree, in sequential focus order, has an accessible name).

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think that's necessary.

_rules/iframe-accessible-name-cae760.md Outdated Show resolved Hide resolved
@@ -150,12 +151,22 @@ Does not apply to non `iframe` element.

#### Inapplicable Example 2

`iframe` is not [included in the accessibility tree][].
This `iframe` is not part of [sequential focus navigation][], nor [included in the accessibility tree][] because of `display: none;`.
Copy link
Collaborator

Choose a reason for hiding this comment

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

As far as I understand, browsers that "force push" iframes in sequential navigation won't do it here because of the display:none, which is fine.
The description, however, looks a bit like the "because of display:none is related only to the second part (not in the accessibility tree) rather than to both.

But I don't really have any idea to improve it…

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, leaving it as is, since it got 2 approvals.


```html
<iframe style="display:none;" src="/test-assets/SC4-1-2-frame-doc.html"> </iframe>
```

#### Inapplicable Example 3

This `iframe` is not part of [sequential focus navigation][] because it has `tabindex="-1"` and not [included in the accessibility tree][] because of `role="presentation"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
This `iframe` is not part of [sequential focus navigation][] because it has `tabindex="-1"` and not [included in the accessibility tree][] because of `role="presentation"`
This `iframe` is neither part of [sequential focus navigation][] (because it has `tabindex="-1"`) nor ([included in the accessibility tree][] because of `role="presentation"`).

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't know what this is for, seems unnecessary.

@Jym77
Copy link
Collaborator

Jym77 commented Jan 16, 2020

The same thing applies to all rules that test for accessible names of "user interface components". I do recall discussions on this very matter previously, but I don't recall when nor where.

Should there be a generic rule like "element in tab order has accessible name"?
Since that is probably confusing anyway to have a tab-stop in something that you have no clue what it is…

@WilcoFiers WilcoFiers added the Review Call 1 week Call for review for small changes label Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Review Call 1 week Call for review for small changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants