Skip to content

Commit

Permalink
Handling Presentational role conflict resolution (#1189)
Browse files Browse the repository at this point in the history
* Add conflict resolution in definition
* Add examples of presentational conflict resolution
  • Loading branch information
Jym77 committed Apr 28, 2020
1 parent f56525f commit 6faf0c5
Show file tree
Hide file tree
Showing 23 changed files with 253 additions and 84 deletions.
1 change: 1 addition & 0 deletions __tests__/spelling-ignore.yml
Expand Up @@ -134,6 +134,7 @@
- personalization
- autofill
- implementers
- presentational
- backtick
- camelCase

Expand Down
1 change: 1 addition & 0 deletions _rules/aria-required-context-role-ff89c9.md 100644 → 100755
Expand Up @@ -12,6 +12,7 @@ accessibility_requirements:
inapplicable: further testing needed
input_aspects:
- Accessibility tree
- CSS styling
- DOM Tree
acknowledgments:
authors:
Expand Down
1 change: 1 addition & 0 deletions _rules/aria-required-owned-element-bc4a75.md 100644 → 100755
Expand Up @@ -12,6 +12,7 @@ accessibility_requirements:
inapplicable: further testing needed
input_aspects:
- Accessibility tree
- CSS styling
- DOM Tree
acknowledgments:
authors:
Expand Down
22 changes: 21 additions & 1 deletion _rules/aria-state-or-property-permitted-5c01ea.md
Expand Up @@ -17,6 +17,8 @@ accessibility_requirements:
passed: satisfied
inapplicable: satisfied
input_aspects:
- Accessibility Tree
- CSS styling
- DOM Tree
acknowledgments:
authors:
Expand All @@ -40,7 +42,7 @@ _There are currently no assumptions_

## Accessibility Support

_There are no major accessibility support issues known for this rule._
Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some elements can have a [semantic role][] of `none` and their attributes fail this rule with some technologies but users of other technology would not experience any accessibility issue.

## Background

Expand Down Expand Up @@ -128,6 +130,22 @@ The `aria-label` [state][] is [global][] and thus [inherited][] for all [semanti
</svg>
```

#### Passed Example 10

This `aside` element has an [explicit role][] of `none`. However, the [global][] [property][] `aria-label` is specified. Thus it has a [semantic role][] of `complementary` due to [Presentational Roles Conflict Resolution][]. The `aria-expanded` [state][] is [inherited][] for the `complementary` role.

```html
<aside role="none" aria-label="About ACT rules" aria-expanded="true">ACT rules are cool!</aside>
```

#### Passed Example 11

This `aside` element has an [explicit role][] of `none`. However, it is [focusable][] due to the `tabindex` attribute. Thus it has a [semantic role][] of `complementary` due to [Presentational Roles Conflict Resolution][]. The `aria-expanded` [state][] is [supported][] for the `complementary` role.

```html
<aside role="none" tabindex="0" aria-expanded="true">ACT rules are cool!</aside>
```

### Failed

#### Failed Example 1
Expand Down Expand Up @@ -157,10 +175,12 @@ This `div` element is not [included in the accessibility tree][], hence its [WAI
```

[explicit role]: #explicit-role 'Definition of Explicit Role'
[focusable]: #focusable 'Definition of focusable'
[global]: https://www.w3.org/TR/wai-aria-1.1/#global_states 'Definition of Global ARIA States and Properties'
[implicit role]: #implicit-role 'Definition of Implicit Role'
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of Included in the Accessibility Tree'
[inherited]: https://www.w3.org/TR/wai-aria/#inheritedattributes 'Definition of Inherited ARIA States and Properties'
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
[property]: https://www.w3.org/TR/wai-aria/#dfn-property 'Definition of ARIA Property'
[required]: https://www.w3.org/TR/wai-aria/#requiredState 'Definition of Required ARIA States and Properties'
[semantic role]: #semantic-role 'Definition of Semantic Role'
Expand Down
39 changes: 15 additions & 24 deletions _rules/autocomplete-valid-value-73f2c2.md 100644 → 100755
Expand Up @@ -11,6 +11,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
input_aspects:
- Accessibility Tree
- DOM Tree
- CSS Styling
acknowledgments:
Expand Down Expand Up @@ -52,7 +53,8 @@ For this rule, it is assumed that the `autocomplete` attribute is not used on fo

## Accessibility Support

While `autocomplete` in a promising technique for supporting personalization in HTML, support for this is fairly limited.
- While `autocomplete` in a promising technique for supporting personalization in HTML, support for this is fairly limited.
- Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some elements can have a [semantic role][] of `none` and fail this rule with some technology but users of other technologies would not experience any accessibility issue.

## Background

Expand Down Expand Up @@ -127,7 +129,7 @@ Full length autocomplete terms.

#### Passed Example 8

The `input` element does not have a semantic role that is a widget role, but still participates in sequential focus navigation, and has a single autocomplete term.
This `input` element has an [explicit role][] of `none`. However, it is [focusable][] (by default). Thus it has a [semantic role][] of `textbox` due to [Presentational Roles Conflict Resolution][]. It has a single autocomplete term.

```html
<input role="none" autocomplete="username" />
Expand Down Expand Up @@ -219,64 +221,53 @@ The element is hidden through `display:none`.

#### Inapplicable Example 4

The element is positioned off screen and hidden to assistive technologies

```html
<input autocomplete="username" aria-hidden="true" style="position:absolute; top:-9999em" />
```

#### Inapplicable Example 5

The `input` element has a `type` attribute that is in the `button` state.

```html
<input type="button" autocomplete="username" />
```

#### Inapplicable Example 6
#### Inapplicable Example 5

The `input` element has a `type` attribute that is in the `hidden` state.

```html
<input type="hidden" autocomplete="username" />
```

#### Inapplicable Example 7
#### Inapplicable Example 6

The `input` element has an HTML `disabled` attribute.

```html
<input autocomplete="username" disabled />
```

#### Inapplicable Example 8
#### Inapplicable Example 7

The `input` element has an `aria-disabled` attribute with value `true`.

```html
<input autocomplete="username" aria-disabled="true" />
```

#### Inapplicable Example 9

Non-widget element that does not participate in sequential focus navigation.

```html
<input type="button" role="none" tabindex="-1" autocomplete="username" />
```

#### Inapplicable Example 10
#### Inapplicable Example 8

Non-widget element that does not participate in sequential focus navigation.

```html
<input type="button" role="none" tabindex="-2" autocomplete="username" />
<input type="button" role="none" disabled autocomplete="username" />
```

#### Inapplicable Example 11
#### Inapplicable Example 9

Autocomplete attribute contains no tokens.

```html
<input autocomplete=" " />
```

[explicit role]: #explicit-role 'Definition of explicit role'
[focusable]: #focusable 'Definition of focusable'
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
[semantic role]: #semantic-role 'Definition of Semantic Role'
23 changes: 22 additions & 1 deletion _rules/button-accessible-name-97a4e1.md
Expand Up @@ -11,6 +11,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
input_aspects:
- Accessibility Tree
- DOM Tree
- CSS Styling
acknowledgments:
Expand Down Expand Up @@ -39,7 +40,7 @@ Each target element has an [accessible name][] that is not empty (`""`).

## Accessibility Support

There are no major accessibility support issues known for this rule.
- Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some elements can have a [semantic role][] of `button` and fail this rule with some technology but users of other technologies would not experience any accessibility issue.

## Background

Expand Down Expand Up @@ -164,6 +165,14 @@ This off screen `button` element has no [accessible name][] because it has no co
</html>
```

#### Failed Example 5

This `button` element has an [explicit role][] of `none`. However, it is [focusable][] (by default). Thus it has a [semantic role][] of `button` due to [Presentational Roles Conflict Resolution][]. It has an empty [accessible name][].

```html
<button role="none"></button>
```

### Inapplicable

#### Inapplicable Example 1
Expand Down Expand Up @@ -198,5 +207,17 @@ There is no element with a semantic role of `button`.
<div>Press Here</div>
```

#### Inapplicable Example 5

This `button` element has an [explicit role][] of `none`; it is not [focusable][] because it is `disabled`. Thus it has a [semantic role][] of `none`.

```html
<button role="none" disabled></button>
```

[accessible name]: #accessible-name 'Definition of accessible name'
[explicit role]: #explicit-role 'Definition of explicit role'
[focusable]: #focusable 'Definition of focusable'
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree'
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
[semantic role]: #semantic-role 'Definition of Semantic Role'
4 changes: 3 additions & 1 deletion _rules/descriptive-link-5effbb.md
Expand Up @@ -16,6 +16,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
input_aspects:
- Accessibility Tree
- DOM Tree
- CSS Styling
- Language
Expand Down Expand Up @@ -45,7 +46,7 @@ The [accessible name][] of each target element together with its [programmatical

## Accessibility Support

_There are no major accessibility support issues known for this rule._
- Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some elements can have a [semantic role][] of `link` and fail this rule with some technology but users of other technologies would not experience any accessibility issue.

## Background

Expand Down Expand Up @@ -325,6 +326,7 @@ An `a` element without the [semantic role][] `link`.
[accessible name]: #accessible-name 'Definition of accessible name'
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree'
[link]: https://www.w3.org/TR/wai-aria/#link
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
[programmatically determined link context]: #programmatically-determined-link-context 'Definition of programmatically determined link context'
[semantic role]: #semantic-role 'Definition of semantic role'
[whitespace]: #whitespace 'Definition of whitespace'
18 changes: 17 additions & 1 deletion _rules/form-control-accessible-name-e086e5.md
Expand Up @@ -11,6 +11,8 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
input_aspects:
- Accessibility Tree
- CSS styling
- DOM Tree
acknowledgments:
authors:
Expand Down Expand Up @@ -43,6 +45,7 @@ _There are currently no assumptions_

- Certain assistive technologies can be set up to ignore the title attribute, which means that to some users the title attribute will not act as an [accessible name][].
- Several assistive technologies have a functionality to list all form fields on a page, including the `disabled` ones. Therefore this rule is still applicable to `disabled` form fields. If an assistive technology consistently ignores `disabled` form fields in all its interactions, then it is possible to have a `disabled` form field with no accessible name without creating accessibility issues for the user.
- Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some elements can have one of the applicable [semantic roles][] and fail this rule with some technology but users of other technologies would not experience any accessibility issue.

## Background

Expand Down Expand Up @@ -176,6 +179,14 @@ The [accessible name][] is empty.
<label> <input /></label>
```

#### Failed Example 8

This `input` element has an [explicit role][] of `none`. However, it is [focusable][] (by default). Thus it has a [semantic role][] of `textbox` due to [Presentational Roles Conflict Resolution][]. It has an empty [accessible name][].

```html
<input role="none" />
```

### Inapplicable

#### Inapplicable Example 1
Expand All @@ -191,7 +202,7 @@ Hidden to everyone.
Hidden to assistive technologies.

```html
<input aria-hidden="true" aria-label="firstname" />
<input disabled aria-hidden="true" aria-label="firstname" />
```

#### Inapplicable Example 3
Expand All @@ -215,5 +226,10 @@ Option inherits from input, but has a required context role of listbox which inh
```

[accessible name]: #accessible-name 'Definition of accessible name'
[explicit role]: #explicit-role 'Definition of Explicit Role'
[focusable]: #focusable 'Definition of focusable'
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree'
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
[semantic role]: #semantic-role 'Definition of Semantic Role'
[semantic roles]: #semantic-role 'Definition of semantic role'
[whitespace]: #whitespace 'Definition of whitespace'
6 changes: 5 additions & 1 deletion _rules/form-control-label-descriptive-cc0f0a.md
Expand Up @@ -16,6 +16,7 @@ accessibility_requirements:
passed: further testing needed
inapplicable: further testing needed
input_aspects:
- Accessibility Tree
- DOM Tree
- CSS Styling
- Language
Expand Down Expand Up @@ -71,7 +72,7 @@ Each test target, together with its [visual context][], describes the purpose of

## Accessibility Support

_There are no major accessibility support issues known for this rule._
- Implementation of [Presentational Roles Conflict Resolution][] varies from one browser or assistive technology to another. Depending on this, some elements can have one of the applicable [semantic roles][semantic role] and fail this rule with some technology but users of other technologies would not experience any accessibility issue.

## Background

Expand Down Expand Up @@ -267,8 +268,11 @@ The `span` element is not a [programmatic label][] of any element.
[abstract]: https://www.w3.org/TR/wai-aria/#abstract_roles 'List of abstract roles'
[accessible name]: #accessible-name 'Definition of accessible name'
[aria11]: https://www.w3.org/TR/wai-aria-1.1/ 'Accessible Rich Internet Applications 1.1'
[explicit role]: #explicit-role 'Definition of explicit role'
[focusable]: #focusable 'Definition of focusable'
[included in the accessibility tree]: #included-in-the-accessibility-tree 'Definition of included in the accessibility tree'
[label]: https://www.w3.org/TR/WCAG21/#dfn-labels 'Definition of label'
[presentational roles conflict resolution]: https://www.w3.org/TR/wai-aria-1.1/#conflict_resolution_presentation_none 'Presentational Roles Conflict Resolution'
[programmatic label]: #programmatic-label 'Definition of programmatic label'
[sc246]: https://www.w3.org/WAI/WCAG21/#headings-and-labels.html 'Success Criterion 2.4.6: Heading and Labels'
[sc253]: https://www.w3.org/WAI/WCAG21/label-in-name 'Success Criterion 2.5.3: Label in Name'
Expand Down

0 comments on commit 6faf0c5

Please sign in to comment.