This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 12703 - Review/Modify/Add IA2 and ATK role mapping for elements
Summary: Review/Modify/Add IA2 and ATK role mapping for elements
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML a11y APIs (editor: Steve Faulkner, Cynthia Shelly) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: alexander surkov
QA Contact: HTML a11y API spec bugbot
URL: http://dev.w3.org/html5/html-api-map/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-19 14:47 UTC by David Bolter
Modified: 2013-08-15 17:16 UTC (History)
5 users (show)

See Also:


Attachments
wip (7.57 KB, patch)
2013-08-06 17:53 UTC, alexander surkov
Details
wip2 (11.63 KB, patch)
2013-08-07 22:31 UTC, alexander surkov
Details
IA2 A-D v1 (26.41 KB, patch)
2013-08-08 20:20 UTC, alexander surkov
Details

Description David Bolter 2011-05-19 14:47:16 UTC

    
Comment 1 alexander surkov 2013-06-19 05:40:22 UTC
David, do you mind if I steal this one?
Comment 2 David Bolter 2013-06-19 16:27:40 UTC
(In reply to comment #1)
> David, do you mind if I steal this one?

Completely fell of my radar. Please do!
Comment 3 alexander surkov 2013-08-06 17:53:05 UTC
Created attachment 1382 [details]
wip

Is it ok to take this as a pattern?
Comment 4 Jason Kiss 2013-08-06 23:21:31 UTC
(In reply to comment #3)
> Created attachment 1382 [details]
> wip
> 
> Is it ok to take this as a pattern?

I think the additions are helpful, though we'll want to be consistent and add the new classes and markup as applicable in the MSAA + UIA Express, MSAA + IA2, and AT-SPI columns as well, so there is a bit of work to do in that regard.

The other concern I have is about using CSS generated content to add meaningful content that isn't already provided some other way. CSS generated content is not well supported for various browser/screen readers, nor is it best practice. 

What about adding the "Role: ", "States: ", "Actions: ", etc. text directly as content? It's an unpleasant task, but no more unpleasant than adding the markup as proposed in the patch.
Comment 5 alexander surkov 2013-08-07 15:34:04 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > Created attachment 1382 [details]
> > wip
> > 
> > Is it ok to take this as a pattern?
> 
> I think the additions are helpful, though we'll want to be consistent and
> add the new classes and markup as applicable in the MSAA + UIA Express, MSAA
> + IA2, and AT-SPI columns as well, so there is a bit of work to do in that
> regard.

I will handle IA2 + ATK.

> The other concern I have is about using CSS generated content to add
> meaningful content that isn't already provided some other way. CSS generated
> content is not well supported for various browser/screen readers, nor is it
> best practice. 

> What about adding the "Role: ", "States: ", "Actions: ", etc. text directly
> as content? It's an unpleasant task, but no more unpleasant than adding the
> markup as proposed in the patch.

fine with me
Comment 6 Jason Kiss 2013-08-07 19:34:21 UTC
(In reply to comment #5)
 
> I will handle IA2 + ATK.

I'll take UIA Express and UIA then. I'm assuming the best terminology will be "Control Type", and "Control Pattern" as applicable. Where there are Text Attribute Identifiers or Property Identifiers, perhaps just "Identifier" will be sufficient, otherwise it's getting a little verbose. But since they're rather few in number, being more explicit might be better. Will take a stab and see how it goes.
Comment 7 alexander surkov 2013-08-07 19:37:12 UTC
Can you give a code snippet please how you think the things should look to make sure we are on the same page?
Comment 8 Jason Kiss 2013-08-07 21:34:08 UTC
The content of table cells is currently laid out mostly with <br> elements. There are a few <p>s in there. What do you think about the following options?

<td>
<span class="type">Role: </span>ROLE_SYSTEM_LINK<br><br>
<span class="type">States: </span>STATE_SYSTEM_LINKED to link and all its descendants. If link is visited then STATE_SYSTEM_TRAVERSED.<br><br>
<span class="type">Actions: </span>"jump" action on link and all its descendants.
</td>

<td>
<b>Role:</b> ROLE_SYSTEM_LINK<br><br>
<b>States:</b> STATE_SYSTEM_LINKED to link and all its descendants. If link is visited then STATE_SYSTEM_TRAVERSED.<br><br>
<b>Actions:</b> "jump" action on link and all its descendants.
</td>

I think I'm partial to the second one.
Comment 9 alexander surkov 2013-08-07 21:39:39 UTC
the first one is more flexible since we can apply CSS styles. Should we have a class for the whole item like

<div class="item">
  <span class="type">Role: </span>IA2_ROLE_SHAPE
</div>

also we might want to have specific classes like "role", "states" instead generic "item", that'd be helpful if we want to have some automatic processing in the future or just for simple findings in the source code.

btw, 4 spaces looks like a really huge offset (I've got usual to deal with 2 spaces offset)
Comment 10 Jason Kiss 2013-08-07 22:16:13 UTC
(In reply to comment #9)
> the first one is more flexible since we can apply CSS styles. Should we have
> a class for the whole item like
> 
> <div class="item">
>   <span class="type">Role: </span>IA2_ROLE_SHAPE
> </div>
> 
> also we might want to have specific classes like "role", "states" instead
> generic "item", that'd be helpful if we want to have some automatic
> processing in the future or just for simple findings in the source code.
> 

Agree. It involves more work in preparing for the heartbeat, assuming that we want to commit to having these changes implemented for the heartbeat.

> btw, 4 spaces looks like a really huge offset (I've got usual to deal with 2
> spaces offset)

That's gonna be a personal preference, but I've no objections if you want to change it.
Comment 11 alexander surkov 2013-08-07 22:27:03 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > the first one is more flexible since we can apply CSS styles. Should we have
> > a class for the whole item like
> > 
> > <div class="item">
> >   <span class="type">Role: </span>IA2_ROLE_SHAPE
> > </div>
> > 
> > also we might want to have specific classes like "role", "states" instead
> > generic "item", that'd be helpful if we want to have some automatic
> > processing in the future or just for simple findings in the source code.
> > 
> 
> Agree. It involves more work in preparing for the heartbeat, assuming that
> we want to commit to having these changes implemented for the heartbeat.

I can go with either way. The major work for me is to check implementation, different specs, write some tests. Fixing a HTML spec is a minor work with me.

> > btw, 4 spaces looks like a really huge offset (I've got usual to deal with 2
> > spaces offset)
> 
> That's gonna be a personal preference, but I've no objections if you want to
> change it.

I'd go with 2 spaces, otherwise noticeable portion of the screen is in spaces for me :)
Comment 12 alexander surkov 2013-08-07 22:31:35 UTC
Created attachment 1383 [details]
wip2

next version, please check if it looks ok
Comment 13 Jason Kiss 2013-08-07 22:37:06 UTC
(In reply to comment #12)
> Created attachment 1383 [details]
> wip2
> 
> next version, please check if it looks ok

Works for me.
Comment 14 alexander surkov 2013-08-08 20:20:23 UTC
Created attachment 1384 [details]
IA2 A-D v1

let's go by parts (please check if it looks ok before I land it)
Comment 15 Jason Kiss 2013-08-08 22:29:32 UTC
(In reply to comment #14)
> Created attachment 1384 [details]
> IA2 A-D v1
> 
> let's go by parts (please check if it looks ok before I land it)

Looks good. Just wondering if its worth considering some shorter class names, e.g.,

.general -> .gen
.objattrs -> .objatt
.textattrs -> .txtatt 
.relations -> .rel

Either way, okay by me to land it.
Comment 16 alexander surkov 2013-08-08 23:52:55 UTC
I'd go with longer names, especially because it's mostly copy/paste thing
Comment 17 Jason Kiss 2013-08-11 03:54:14 UTC
Alex, I just noticed that for those elements where MSAA doesn't provide a distinct role, you've indicated use of BSTR to pass the tag name as role string. As I understand it, this is a browser-specific approach to overcome the limits of MSAA and is considered non-conformant with the MSAA spec.

Last September it was decided that we wouldn't include browser-specific notes in the normative mappings, but that the more common of these alternative approaches would be described in the "Other Accessibility Implementations" section of the mapping guide [1]. The string in VARIANT approach is described in this section [2]. This followed from a bug you filed regarding the blockquote and q mappings [3].

What do you think about adding the BSTR notes to section 5.1 instead and describing in more detail the use of BSTR, maybe listing there which elements get that treatment? 

Also, it seems that Mozilla is considering or close to removing the BSTR hack? [4]


[1] http://rawgithub.com/w3c/html-api-map/master/index.html#other-accessibility-implementations
[2] http://rawgithub.com/w3c/html-api-map/master/index.html#use-of-msaa-variant-by-some-user-agents
[3] https://www.w3.org/Bugs/Public/show_bug.cgi?id=16769#c3
[4] https://bugzilla.mozilla.org/show_bug.cgi?id=798492
Comment 18 alexander surkov 2013-08-12 13:07:19 UTC
(In reply to comment #17)
> Alex, I just noticed that for those elements where MSAA doesn't provide a
> distinct role, you've indicated use of BSTR to pass the tag name as role
> string. As I understand it, this is a browser-specific approach to overcome
> the limits of MSAA and is considered non-conformant with the MSAA spec.

As you know there are two implementations: IE and Firefox (Chrome). As long as we have two columns MSAA + UI Express and MSAA + IA2 then we put alternative implementations right into the table. In other words as long as MSAA columns of the same row contain different values then we deal with alternative implementations because the browser simply can't provide two MSAA implementations.

> Last September it was decided that we wouldn't include browser-specific
> notes in the normative mappings, but that the more common of these
> alternative approaches would be described in the "Other Accessibility
> Implementations" section of the mapping guide [1]. The string in VARIANT
> approach is described in this section [2]. This followed from a bug you
> filed regarding the blockquote and q mappings [3].

I think I can remove those but what should I put there instead of it? Does it make sense to point there some generic role even if nobody implements it?

> What do you think about adding the BSTR notes to section 5.1 instead and
> describing in more detail the use of BSTR, maybe listing there which
> elements get that treatment? 

We can do this but basically it should mean that we need to copy/paste that big table, right?

> Also, it seems that Mozilla is considering or close to removing the BSTR
> hack? [4]

only for ARIA roles, iirc AT have dependencies on tag name BSTR roles.
Comment 19 alexander surkov 2013-08-12 16:12:03 UTC
Let's I finish the mapping using BSTR roles in this bug for now and let's have another follow up where we decide how we will proceed with it. Sounds ok?
Comment 22 Jason Kiss 2013-08-12 22:57:22 UTC
(In reply to comment #18)
> (In reply to comment #17)
> > Alex, I just noticed that for those elements where MSAA doesn't provide a
> > distinct role, you've indicated use of BSTR to pass the tag name as role
> > string. As I understand it, this is a browser-specific approach to overcome
> > the limits of MSAA and is considered non-conformant with the MSAA spec.
> 
> As you know there are two implementations: IE and Firefox (Chrome). As long
> as we have two columns MSAA + UI Express and MSAA + IA2 then we put
> alternative implementations right into the table. In other words as long as
> MSAA columns of the same row contain different values then we deal with
> alternative implementations because the browser simply can't provide two
> MSAA implementations.
> 
> > Last September it was decided that we wouldn't include browser-specific
> > notes in the normative mappings, but that the more common of these
> > alternative approaches would be described in the "Other Accessibility
> > Implementations" section of the mapping guide [1]. The string in VARIANT
> > approach is described in this section [2]. This followed from a bug you
> > filed regarding the blockquote and q mappings [3].
> 
> I think I can remove those but what should I put there instead of it? Does
> it make sense to point there some generic role even if nobody implements it?


As far as I know, the intention is for the mapping guide to be a normative spec, in which case I'm not sure we want to be using the mapping tables to document browser-specific uses of a11y APIs, esp. where they don't conform to the API's spec. If a generic role is appropriate, but nobody currently implements it, then we can point to that role in the table, but note in section 5.1 the alternative approaches that other UAs take.


> 
> > What do you think about adding the BSTR notes to section 5.1 instead and
> > describing in more detail the use of BSTR, maybe listing there which
> > elements get that treatment? 
> 
> We can do this but basically it should mean that we need to copy/paste that
> big table, right?


Instead of a table, couldn't we add some text similar to that on the MDN site? https://developer.mozilla.org/en-US/docs/Accessibility/AT-APIs/Differences/MSAA#_Document_Structure_Exposed_in_MSAA_Tree_
Comment 23 Jason Kiss 2013-08-12 23:01:22 UTC
(In reply to comment #19)
> Let's I finish the mapping using BSTR roles in this bug for now and let's
> have another follow up where we decide how we will proceed with it. Sounds
> ok?

I'd prefer to have it sorted in time for the heartbeat, given previous discussions/decisions on what the mapping tables represent. But I'm not opposed to reopening the discussion either, so to that extent, as long as what we have for the heartbeat is at least temporarily coherent, I'm fine with leaving the BSTRs in the mappings for now. The doc is in a lot of flux recently, and I expect this to keep up post heartbeat, so there's not that much of an issue either way.
Comment 24 alexander surkov 2013-08-13 02:09:27 UTC
(In reply to comment #22)

> As far as I know, the intention is for the mapping guide to be a normative
> spec, in which case I'm not sure we want to be using the mapping tables to
> document browser-specific uses of a11y APIs, esp. where they don't conform
> to the API's spec. 

Do I understand right it means that MSAA+UIExpress and MSAA+IA2 must have same values for MSAA parts?

> If a generic role is appropriate, but nobody currently
> implements it, then we can point to that role in the table, but note in
> section 5.1 the alternative approaches that other UAs take.

what mark can be used to specify this is "should be" (not "must be") item?

> Instead of a table, couldn't we add some text similar to that on the MDN
> site?
> https://developer.mozilla.org/en-US/docs/Accessibility/AT-APIs/Differences/
> MSAA#_Document_Structure_Exposed_in_MSAA_Tree_

btw, do the spec really needs to describe alternative implementations?
Comment 25 Jason Kiss 2013-08-13 04:18:07 UTC
(In reply to comment #24)

> Do I understand right it means that MSAA+UIExpress and MSAA+IA2 must have
> same values for MSAA parts?

That's how I understand it. Compare the ARIA UA Implementation table: http://www.w3.org/TR/wai-aria-implementation/#mapping_role_table

> > If a generic role is appropriate, but nobody currently
> > implements it, then we can point to that role in the table, but note in
> > section 5.1 the alternative approaches that other UAs take.
> 
> what mark can be used to specify this is "should be" (not "must be") item?
> 

I'm proposing that the entries in the mapping table make no reference to the BSTR (or other) approaches, and that these be dealt with entirely in section 5.1. For example, with some text such as the following:

"In Firefox, the following HTML elements are exposed using the tag name as a BSTR values in the VARIANT: abbr, acronym, blockquote, dd, dl, dt, form, frame, h1, h2, h3, h4, h5, h6, iframe, q, tbody, tfoot, thead..." [Adding to the list as necessary]

> > Instead of a table, couldn't we add some text similar to that on the MDN
> > site?
> > https://developer.mozilla.org/en-US/docs/Accessibility/AT-APIs/Differences/
> > MSAA#_Document_Structure_Exposed_in_MSAA_Tree_
> 
> btw, do the spec really needs to describe alternative implementations?

I'm considering the use of BSTR an alternative implementation, and given its extensive use by Firefox and Chrome, I think it's worth describing, just not part of the normative mappings.

Again, I'm not opposed to reopening this decision. Would be great to get Cynthia and Steve's comments.
Comment 26 alexander surkov 2013-08-13 13:52:38 UTC
(In reply to comment #25)
> (In reply to comment #24)
> 
> > Do I understand right it means that MSAA+UIExpress and MSAA+IA2 must have
> > same values for MSAA parts?

> That's how I understand it. Compare the ARIA UA Implementation table:
> http://www.w3.org/TR/wai-aria-implementation/#mapping_role_table

ok, that makes sense but then we probably should have 3 columns: MSAA, UIA Express and IAccessible2. Otherwise it's confusing because the single implementation can't maintain two different MSAA implementation (one is for UIA Express and another one for IA2). What do you think?
Comment 27 alexander surkov 2013-08-13 14:18:27 UTC
Btw, if MSAA impl is supposed to be same then how do we manage when UIA Express claims a certain role and IA2 says there's no accessible?
Comment 28 alexander surkov 2013-08-13 17:16:17 UTC
Looking more it seems MSAA mapping is too different in UIAExpress and IA2 columns to have a common multiplier. It seems like the whole IA2 column can be treated as alternative implementation to UIAExpress.
Comment 29 Jason Kiss 2013-08-13 18:12:56 UTC
(In reply to comment #28)
> Looking more it seems MSAA mapping is too different in UIAExpress and IA2
> columns to have a common multiplier. It seems like the whole IA2 column can
> be treated as alternative implementation to UIAExpress.

The MSAA+UIAExpress column needs to be updated so that the MSAA role guidance matches that as you have it in the MSAA+IA2 column, particularly for those elements where there is no accessible, ie, where MSAA+UIAExpress currently suggests ROLE_SYSTEM_TEXT. That was a mistake, I think, from a while back.

I need to take care of that, and quick! But if that change is done, then I think things should be clearer (and consistent with the way the ARIA mappings are presented, unless you think the way the ARIA mappings are presented isn't clear).
Comment 30 alexander surkov 2013-08-13 19:04:05 UTC
Ok, I need to finish the mapping and then we can make sure MSAA implementation can be shared between UIAExpress and IA2.

IA2 K-N elements:

https://github.com/w3c/html-api-map/commit/5555f5c7084e5a940416be1d393d594c900e456a
Comment 32 alexander surkov 2013-08-14 15:42:22 UTC
S-W elements (IA2): https://github.com/w3c/html-api-map/commit/8170d9e8e60fb9db5a2b3ff1bcf6327c1cb76ebd
Comment 33 alexander surkov 2013-08-15 02:53:11 UTC
ATK A-I elements: https://github.com/w3c/html-api-map/commit/9b5845373ee0442d0b7829d612cabe9810a86331
Comment 34 Jason Kiss 2013-08-15 06:22:14 UTC
Where an element doesn't have an accessible, but is exposed via text attributes, could "Role: None" be used to indicate this in a way that's more consistent with the presentation of mappings for other elements? The use of text attributes could then be added in <div class="general"></div>. What do you think?
Comment 35 alexander surkov 2013-08-15 14:10:47 UTC
(In reply to comment #34)
> Where an element doesn't have an accessible, but is exposed via text
> attributes, could "Role: None" be used to indicate this in a way that's more
> consistent with the presentation of mappings for other elements? 
> The use of
> text attributes could then be added in <div class="general"></div>. What do
> you think?

I wouldn't do this. Having a role implies there's an accessible. Especially there are rare cases when the accessible may have unknown role which is sort of close to role:none.
Comment 36 alexander surkov 2013-08-15 17:16:58 UTC
ATK K-W elements: https://github.com/w3c/html-api-map/commit/227e554e1b746d0aa012d8fe63ec26429902bb25