Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Spec: Split into 4 docs for 4 phases, give parity with ARIA#62

Merged
minorninth merged 3 commits intoWICG:gh-pagesfrom
minorninth:gh-pages
Mar 17, 2017
Merged

Spec: Split into 4 docs for 4 phases, give parity with ARIA#62
minorninth merged 3 commits intoWICG:gh-pagesfrom
minorninth:gh-pages

Conversation

@minorninth
Copy link
Collaborator

No description provided.

Copy link
Member

@alice alice left a comment

Choose a reason for hiding this comment

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

LGTM with tweaks.

attribute DOMString? roleDescription;

// Accessible label and description.
attribute DOMString? label;
Copy link
Member

Choose a reason for hiding this comment

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

Urgh, I thought we were going to get away from the whole labelledBy/labeledBy controversy here 😞

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Urgh. Not sure what to do, there's no way to win.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I recall we discussed labelElement instead.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I didn't like making this the one glaring exception in otherwise very
straightforward translations from the ARIA attribute names. Any time we
deviate it's just adding confusion for users.

I guess labeledBy because it's different from ARIA but close enough that
it will confuse people.

I guess my preference would be to try to come up with a consistent way to
modify all of the relationship attributes, then, rather than making
labeledBy an exception.

Since it's a reference to an AccessibleNode and not a DOM element, maybe labelNode instead of labelElement?

We could add Node or Nodes to all of them to help convey whether they take a single reference or an array.

labelNode
descriptionNode
activeDescendantNode
controlledNodes
detailsNode
errorMessageNode
flowToNode
ownedNodes

and null otherwise. The validity of a property valid is specified in
greater detail below.
</p>
<p>
Copy link
Member

Choose a reason for hiding this comment

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

ARIA should win, as per my comment on the explainer.

Copy link
Collaborator

@cookiecrook cookiecrook Mar 16, 2017

Choose a reason for hiding this comment

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

@alice wrote:

~"ARIA wins"

Alice, which part of the explainer are you referencing? I recall us agreeing any value defined in AOM would override any content attribute (ARIA or otherwise).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

Nearly all accessibility properties on the AccessibleNode interface have an
equivalent ARIA attribute. When they do, the mappings are very straightforward.
This table shows the mappings and indicates the ones that have different semantics
explained below.
Copy link
Member

Choose a reason for hiding this comment

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

This is awkwardly worded: perhaps "there's a 1:1 correspondence between the set of properties on AccessibleNode and the list of valid ARIA attributes from the WAI-ARIA 1.1 spec."?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done


<table>
<caption>
<dfn>Accessibility property table</dfn>
Copy link
Member

Choose a reason for hiding this comment

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

Where's the rest of this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the diff is a little confusing in GitHub. The table is complete, if you
expand above this it should make sense.

<code>label</code> and <code>description</code>
attributes directly if you want those to change.
Upon setting a property of AccessibleNode, no validation is
done. The user-provided value is simply stored. This is to
Copy link
Member

Choose a reason for hiding this comment

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

Is there a reason to do validation at read time rather than write time? Where does the invalid value live? Is it simply hidden from the accessor?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I think that's better for performance. We can always cache it at read
time, but the purpose is to ensure that if an author sets AccessibleNode
properties and doesn't try to read them back and accessibility is never enabled,
we don't waste any time even trying to validate them.

spec/phase2.html Outdated
Phase 2: Accessible Actions
</h2>
<p>
In this phase, we extent AccessibleNode so that it's also an
Copy link
Member

Choose a reason for hiding this comment

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

typo s/extent/extend/

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

spec/phase2.html Outdated
</pre>
<p>
Accessibility input events are needed for two reasons.
First, because it's possible to create AccessibleNodes
Copy link
Member

Choose a reason for hiding this comment

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

<ul> for the two reasons?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

spec/phase2.html Outdated
<th>event name</th>
<th>type</th>
<th>valid roles</th>
<th>fallback behavior</th>
Copy link
Member

Choose a reason for hiding this comment

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

We haven't discussed what fallback behaviour means before this table. Maybe "(see below)"?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

<code>"scrollbar"</code>,
<code>"slider"</code>
</td>
<td>Change value of INPUT or TEXTAREA element</td>
Copy link
Member

Choose a reason for hiding this comment

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

This may need a little more explanation - how would a TEXTAREA be acting as a scrollbar or slider?

<td><code>"accessiblesetvalue"</code></td>
<td><code>AccessibleSetValueEvent</code></td>
<td>
<code>"scrollbar"</code>,
Copy link
Member

Choose a reason for hiding this comment

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

Incomplete/wrong list of roles?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I haven't updated the other phases much yet, I just moved them to
separate files.

Copy link
Collaborator

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

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

Did you make any substantive changes to Phases 2-4? If so, it's not obvious since those now show up as entirely new files .

</section>
<section id="inclusion">
<h2>Criteria for Inclusion</h2>
<p>The first version of this specification is not intended to be complete. It is currently impossible to make some web features accessible, so the primary goal is to resolve immediate needs quickly for existing, inaccessible web interfaces. The specification editors are purposefully deferring many useful ideas in order to maintain a realistic timeline for highest priority features.</p>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Minor nit: "web" as an adjective should remain lower case like this: "web page", etc. However, as the proper noun ("the Web" or "the World Wide Web") should always be capitalized. It's pretty common for people to mis-interpret this as meaning all instances of the word "web" should be capitalized. Most uses are adjectives and should not be capitalized. 😉

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, I should have clarified, but I deliberately did not make any changes
to phases 2 - 4 in this patch. I just moved them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed "Web".

<code>Element</code>.
</p>
<pre class="idl">
partial interface Node {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Didn't we have a long-term plan to use this on text nodes, too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, but not for phase 1

"grid",
"gridcell",
"group",
"heading",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's correct this errata from ARIA... "image"

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmmm, I'm not so sure we want to use a different lexicon than ARIA here.
Is it worth it to confuse authors and force authors who try to make glue
code to translate things?

attribute double? rangeMax;
attribute double? rangeStep;
attribute double? valueNow;
attribute double? valueMin;
Copy link
Collaborator

Choose a reason for hiding this comment

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

At the F2F, we changed these to rangeValue, etc because they were more clear. Is the goal just to reduce author adoption complexity despite the odd names of some ARIA properties?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, that's exactly the idea.

I guess some minor renaming could be okay, but not having a 1:1
correspondence significantly complicates this phase.

attribute boolean? pressed;

// Control values.
attribute DOMString? value;
Copy link
Collaborator

Choose a reason for hiding this comment

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

At the F2F, we normalized all variants of value (besides rangeValue) to a single "value" property. What's the need for a valueText property if we already have value. Also, I don't think we can remove value because it would be required for different field types (date, tel, etc). valueText appears to be future-limiting for the sole purpose of matching ARIA.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

That was when we were hoping to expose the computed tree.
Maybe in the computed tree we can just expose one value.

Now that we've separated out the ideas of modifying accessibility
attributes in the DOM and getting their computed values, it makes
far more sense for Phase 1 to have parity with ARIA.

Parity with ARIA frees us up to not have to clearly define the semantics
for all of these attributes. Sure, it'd be nice to have a single "value", but
then what do you do if someone specifies both "value" and valueNow?
What about "value" and valueText?

My thinking now is that AccessibleNode in Phase 1 - 3 will be a strict superset of
ARIA, but then the computed accessible properties in Phase 4 can resemble the
native tree much more - i.e. "name", "description", etc.

@@ -308,11 +392,21 @@ <h3>
<td><code>AccessibleNode</code></td>
<td><code>aria-activedescendant</code></td>
Copy link
Collaborator

Choose a reason for hiding this comment

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

liveAtomic

<tr>
<td><code>autocomplete</code></td>
<td><code>enum { "both", "inline", "list", "none" }?</code></td>
<td><code><nobr>aria-autocomplete</nobr></code></td>
Copy link
Collaborator

Choose a reason for hiding this comment

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

liveBusy

@@ -384,20 +497,40 @@ <h3>
<td><code><nobr>aria-invalid</nobr></code></td>
</tr>
<tr>
Copy link
Collaborator

Choose a reason for hiding this comment

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

labelElement

<td><code><nobr>aria-readonly</nobr></code></td>
</tr>
<tr>
<td><code>relevant</code></td>
Copy link
Collaborator

Choose a reason for hiding this comment

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

liveRelevant

</tr>
<tr>
<td><code>valueText</code></td>
<td><code>DOMString?</code></td>
Copy link
Collaborator

Choose a reason for hiding this comment

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

IMO, this should be value for greater forward compatibility.

@minorninth minorninth merged commit 467b0d2 into WICG:gh-pages Mar 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants