<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>27294</bug_id>
          
          <creation_ts>2014-11-10 18:37:14 +0000</creation_ts>
          <short_desc>DOM needs a way to get element&apos;s computed ARIA role and computed label string</short_desc>
          <delta_ts>2016-04-20 21:28:19 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>27297</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="James Craig">jcraig</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>aboxhall</cc>
    
    <cc>annevk</cc>
    
    <cc>arronei</cc>
    
    <cc>d</cc>
    
    <cc>dmazzoni</cc>
    
    <cc>dtrebbien</cc>
    
    <cc>faulkner.steve</cc>
    
    <cc>jcraig</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>robin</cc>
    
    <cc>schwer</cc>
    
    <cc>surkov.alexander</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114756</commentid>
    <comment_count>0</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-11-10 18:37:14 +0000</bug_when>
    <thetext>DOM needs a way to get element&apos;s computed ARIA role and computed label string. For example:

partial interface Element {
  // These might not need to be an accessors methods.
  // Could be string properties instead.
  String computedRole();
  String computedLabel();
};</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114884</commentid>
    <comment_count>1</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-11-13 11:02:24 +0000</bug_when>
    <thetext>see discussion threads here
http://lists.w3.org/Archives/Public/public-pfwg/2014Oct/thread.html#msg120
http://lists.w3.org/Archives/Public/public-pfwg/2014Nov/thread.html#msg105</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116362</commentid>
    <comment_count>2</comment_count>
    <who name="Alice Boxhall">aboxhall</who>
    <bug_when>2014-12-16 00:48:17 +0000</bug_when>
    <thetext>I&apos;m slightly unconvinced about the name &apos;computedLabel&apos; as to me it sounds like it might return an HTMLLabelElement. Would &apos;computedName&apos; work?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116411</commentid>
    <comment_count>3</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-17 09:28:06 +0000</bug_when>
    <thetext>If you want a change to DOM, filing a bug at https://www.w3.org/Bugs/Public/enter_bug.cgi?product=WebAppsWG&amp;component=DOM is more likely to get the attention of the editor, Anne van Kesteren.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116424</commentid>
    <comment_count>4</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-17 16:59:15 +0000</bug_when>
    <thetext>Why do we put these on Element? Why are they methods? And why can&apos;t computedRole just be role?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116429</commentid>
    <comment_count>5</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-17 19:33:11 +0000</bug_when>
    <thetext>I found this bug via the blink-dev thread:
https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/WToTEn4lveY

While it&apos;s not included in the Intent to Implement, Element.role reflecting the content attribute by the same name has been suggested, presumably as a DOMTokenList. In that case another name is needed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116430</commentid>
    <comment_count>6</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-12-17 19:46:33 +0000</bug_when>
    <thetext>They almost certainly should be on HTMLElement, not Element.

They also probably should be getters, not methods.

As for name, I think it&apos;d be confusing if `el.role` doesn&apos;t match `el.getAttribute(&quot;role&quot;)`.

(As to whether you need an `el.role` at all, I don&apos;t care: I personally think reflected attributes are useless and `getAttribute`/`setAttribute` work fine, but hey, we&apos;ve reflected so many attributes already, what&apos;s one more?)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116434</commentid>
    <comment_count>7</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-17 21:37:33 +0000</bug_when>
    <thetext>I agree about HTMLElement. It turns out that Simon has already cloned this into bug 27297, I&apos;d suggest making the case there.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116474</commentid>
    <comment_count>8</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2014-12-18 11:07:29 +0000</bug_when>
    <thetext>(In reply to Domenic Denicola from comment #6)
&gt; They almost certainly should be on HTMLElement, not Element.
&gt; 
&gt; They also probably should be getters, not methods.
&gt; 
&gt; As for name, I think it&apos;d be confusing if `el.role` doesn&apos;t match
&gt; `el.getAttribute(&quot;role&quot;)`.
&gt; 
&gt; (As to whether you need an `el.role` at all, I don&apos;t care: I personally
&gt; think reflected attributes are useless and `getAttribute`/`setAttribute`
&gt; work fine, but hey, we&apos;ve reflected so many attributes already, what&apos;s one
&gt; more?)

My understanding is that this isn&apos;t a reflected attribute but returns the effective role (the first non-abstract role that is understood in the list).

Of course it&apos;s still nicer to call it role and have it be a getter. I don&apos;t see this as an HTML feature so I don&apos;t understand why it was cloned there. This is usable by SVG for instance. I reckon it could go into the DOM, or in its own spec extending the DOM (depending on who does the work).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116475</commentid>
    <comment_count>9</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-12-18 11:32:07 +0000</bug_when>
    <thetext>(In reply to Anne from comment #4)
&gt; Why do we put these on Element? 

Because roles and labels are not specific to HTML. Unless every display language inherits from HTMLElement, these should be on Element.

&gt; Why are they methods? 

Callable methods might be better for implementation performance (lazy getters) since this would have to spin up additional accessibility code in most UAs. If properties can be lazy getters, too, that&apos;s fine.

&gt; And why can&apos;t computedRole just be role?

role should be a the read/write reflected attribute. computedRole is the readonly calculated value of the matched role. For example:

var el = document.createElement(&quot;h1&quot;);

console.log(el.getAttribute(&quot;role&quot;)); // &quot;&quot;
console.log(el.role); // &quot;&quot;
console.log(el.computedRole); // &quot;heading&quot; (no other way to get this via the DOM)

// reset the value
el.setAttribute(&quot;role&quot;, &quot;foo link&quot;);
console.log(el.role); // &quot;foo link&quot;

// computed role is ~ first recognized/implemented role, or default for tagName.
console.log(el.computedRole); // &quot;link&quot;

el.removeAttribute(&quot;role&quot;);
console.log(el.computedRole); // &quot;heading&quot; (back to the default)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116476</commentid>
    <comment_count>10</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2014-12-18 11:40:38 +0000</bug_when>
    <thetext>(In reply to Alice Boxhall from comment #2)
&gt; I&apos;m slightly unconvinced about the name &apos;computedLabel&apos; as to me it sounds
&gt; like it might return an HTMLLabelElement. Would &apos;computedName&apos; work?

&quot;name&quot; is ambiguous because it means different things across different accessibility APIs and even in host languages. For example, in HTML @name is like a non-unique @id. 

ARIA uses the term &quot;label&quot; consistently, so I&apos;m not convinced this would be a point of confusion for authors. It&apos;s consistent with the meaning used in &lt;label&gt;, @aria-label, @aria-labelledby, and other API uses.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116478</commentid>
    <comment_count>11</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-18 13:07:59 +0000</bug_when>
    <thetext>What should computedRole do that would require spinning up additional accessibility code? Isn&apos;t it simply the first recognized token in the role attribute, or the default role of the element failing that?

Is falling back to the default role of the element important? That detail increases the amount of testing required by a lot, as it brings in https://html.spec.whatwg.org/#wai-aria and any other vocabulary-specific mapping tables.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116479</commentid>
    <comment_count>12</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-18 13:38:22 +0000</bug_when>
    <thetext>(In reply to James Craig from comment #9)
&gt; Because roles and labels are not specific to HTML. Unless every display
&gt; language inherits from HTMLElement, these should be on Element.

With &quot;display language&quot; you mean SVG and HTML? Unless role=&quot;&quot; is supported regardless of namespace, putting them on Element might not be a good idea. (We are trying to see if this can work for class=&quot;&quot; and id=&quot;&quot; but nobody has implemented that so I&apos;m not sure why we would go there for role...)


&gt; &gt; And why can&apos;t computedRole just be role?
&gt; 
&gt; role should be a the read/write reflected attribute. computedRole is the
&gt; readonly calculated value of the matched role.

I think it would be fine for role to serve both those purposes. That&apos;s what e.g. &lt;input&gt;.type does too. If you want the actual value you can just use getAttribute(&quot;role&quot;).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116483</commentid>
    <comment_count>13</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-18 14:45:06 +0000</bug_when>
    <thetext>(In reply to Anne from comment #12)
&gt; (We are trying to see if this can work for class=&quot;&quot; and id=&quot;&quot; but nobody has
&gt; implemented that so I&apos;m not sure why we would go there for role...)

I tested this just now, className and id have moved to Element in Blink, Gecko and WebKit. Only IE is left.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116485</commentid>
    <comment_count>14</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2014-12-18 14:51:18 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #11)
&gt; What should computedRole do that would require spinning up additional
&gt; accessibility code? Isn&apos;t it simply the first recognized token in the role
&gt; attribute, or the default role of the element failing that?
&gt; 
&gt; Is falling back to the default role of the element important? That detail
&gt; increases the amount of testing required by a lot, as it brings in
&gt; https://html.spec.whatwg.org/#wai-aria and any other vocabulary-specific
&gt; mapping tables.

wondering whether getComputedrole will return ARIA abstract of elements accessibility API mapping? If so what is done in cases where there is no ARIA equivalent (of which there are many).

Also currently role mappings are only represented in acc APIs as ARIA role values , when the ARIA role value is used by the APIs because their is not an acc API equivalent, most landmark roles, for example.

Note https://html.spec.whatwg.org/#wai-aria is not used as an implementation reference by any implementers as far as I know (blink/Firefox/IE/webkit), because it is stale and does not match actual implementations in some cases and only provides a limited subset of implementation information which has to be then mapped back to the ARIA spec

For HTML acc layer implementation this is the spec that is used http://rawgit.com/w3c/aria/master/html-aam/html-aam.html

Mapping to Existing WAI-ARIA Role Semantics
http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#mapping-to-existing-wai-aria-role-semantics

HTML Element Role Mappings
http://rawgit.com/w3c/aria/master/html-aam/html-aam.html#html-element-role-mappings

for conformance checker stuff the requirements are being defined here:
https://specs.webplatform.org/html-aria/webspecs/master/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116493</commentid>
    <comment_count>15</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-18 15:14:33 +0000</bug_when>
    <thetext>(In reply to steve faulkner from comment #14)
&gt; (In reply to Philip Jägenstedt from comment #11)
&gt; &gt; What should computedRole do that would require spinning up additional
&gt; &gt; accessibility code? Isn&apos;t it simply the first recognized token in the role
&gt; &gt; attribute, or the default role of the element failing that?
&gt; &gt; 
&gt; &gt; Is falling back to the default role of the element important? That detail
&gt; &gt; increases the amount of testing required by a lot, as it brings in
&gt; &gt; https://html.spec.whatwg.org/#wai-aria and any other vocabulary-specific
&gt; &gt; mapping tables.
&gt; 
&gt; wondering whether getComputedrole will return ARIA abstract of elements
&gt; accessibility API mapping?

I don&apos;t know the correct terminology, but yes, I&apos;m wondering if this API will expose the default role of every known element type, requiring a mapping table.

Some use cases and examples of how to use the API could help clarify, I don&apos;t know the core issue and https://www.w3.org/WAI/PF/Group/track/issues/427 is not public.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116508</commentid>
    <comment_count>16</comment_count>
    <who name="Dominic Mazzoni">dmazzoni</who>
    <bug_when>2014-12-18 17:33:04 +0000</bug_when>
    <thetext>The main use-case I have in mind is feature/capability detection. As new ARIA roles are added, and more generally as the ARIA spec improves, web authors need a way to determine whether a particular user agent supports those features, and provide a polyfill if not.

In the case of ARIA roles, a computedRole() interface would allow a web app to determine whether a particular role is recognized, and if not provide an appropriate substitute. While there&apos;s existing support for listing multiple roles, the interaction between ARIA roles in the DOM hierarchy is pretty important and web authors might want more control over them.

As for computedLabel(), one of the possible future enhancements proposed for ARIA is the ability to specify elements that don&apos;t have an id, for ARIA attributes that currently require an IDREF. For example, instead of aria-labelledby=&quot;foo&quot;, two proposed ideas would allow you to use a querySelector string in place of the IDREF, or to use JavaScript to associate a specific DOM element with another element&apos;s ariaLabelledBy reflected attribute.

If either of these ideas makes it into the ARIA standard, authors might be wary of taking advantage of them when they&apos;re not supported in all browsers. Having computedLabel() provides a convenient alternative: use it to test for the presence of the new feature, and provide a polyfill if not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116534</commentid>
    <comment_count>17</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-18 23:17:14 +0000</bug_when>
    <thetext>(In reply to Dominic Mazzoni from comment #16)
&gt; The main use-case I have in mind is feature/capability detection. As new
&gt; ARIA roles are added, and more generally as the ARIA spec improves, web
&gt; authors need a way to determine whether a particular user agent supports
&gt; those features, and provide a polyfill if not.
&gt; 
&gt; In the case of ARIA roles, a computedRole() interface would allow a web app
&gt; to determine whether a particular role is recognized, and if not provide an
&gt; appropriate substitute. While there&apos;s existing support for listing multiple
&gt; roles, the interaction between ARIA roles in the DOM hierarchy is pretty
&gt; important and web authors might want more control over them.

Would a static boolean isRoleSupported(DOMString role) suffice for this purpose? That seems like the simplest possible API for detecting support for a role, and seems trivial to implement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116535</commentid>
    <comment_count>18</comment_count>
    <who name="Alice Boxhall">aboxhall</who>
    <bug_when>2014-12-19 00:12:47 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #17)
&gt; (In reply to Dominic Mazzoni from comment #16)
&gt; &gt; The main use-case I have in mind is feature/capability detection. As new
&gt; &gt; ARIA roles are added, and more generally as the ARIA spec improves, web
&gt; &gt; authors need a way to determine whether a particular user agent supports
&gt; &gt; those features, and provide a polyfill if not.
&gt; &gt; 
&gt; &gt; In the case of ARIA roles, a computedRole() interface would allow a web app
&gt; &gt; to determine whether a particular role is recognized, and if not provide an
&gt; &gt; appropriate substitute. While there&apos;s existing support for listing multiple
&gt; &gt; roles, the interaction between ARIA roles in the DOM hierarchy is pretty
&gt; &gt; important and web authors might want more control over them.
&gt; 
&gt; Would a static boolean isRoleSupported(DOMString role) suffice for this
&gt; purpose? That seems like the simplest possible API for detecting support for
&gt; a role, and seems trivial to implement.

This (In reply to James Craig from comment #9)
&gt; (In reply to Anne from comment #4)
&gt; &gt; Why do we put these on Element? 
&gt; 
&gt; Because roles and labels are not specific to HTML. Unless every display
&gt; language inherits from HTMLElement, these should be on Element.
&gt; 
&gt; &gt; Why are they methods? 
&gt; 
&gt; Callable methods might be better for implementation performance (lazy
&gt; getters) since this would have to spin up additional accessibility code in
&gt; most UAs. If properties can be lazy getters, too, that&apos;s fine.

+1 for read-only lazy properties (this is how I&apos;ve been implementing it, in fact.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116536</commentid>
    <comment_count>19</comment_count>
    <who name="Alice Boxhall">aboxhall</who>
    <bug_when>2014-12-19 00:15:51 +0000</bug_when>
    <thetext>(In reply to James Craig from comment #10)
&gt; (In reply to Alice Boxhall from comment #2)
&gt; &gt; I&apos;m slightly unconvinced about the name &apos;computedLabel&apos; as to me it sounds
&gt; &gt; like it might return an HTMLLabelElement. Would &apos;computedName&apos; work?
&gt; 
&gt; &quot;name&quot; is ambiguous because it means different things across different
&gt; accessibility APIs and even in host languages. For example, in HTML @name is
&gt; like a non-unique @id. 
&gt; 
&gt; ARIA uses the term &quot;label&quot; consistently, so I&apos;m not convinced this would be
&gt; a point of confusion for authors. It&apos;s consistent with the meaning used in
&gt; &lt;label&gt;, @aria-label, @aria-labelledby, and other API uses.

The algorithm to compute the string which would be returned from this method is called the &quot;Accessible Name Calculation&quot; algorithm (http://www.w3.org/TR/wai-aria/roles#namecalculation) so I don&apos;t think it&apos;s really all that consistent.

Both &quot;name&quot; and &quot;label&quot; are fairly overloaded at this point, and I think &quot;name&quot; better represents this concept - see also the general accessibility concept of Name (in the context of Name, Role, State and Value), e.g. http://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-rsv.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116537</commentid>
    <comment_count>20</comment_count>
    <who name="Alice Boxhall">aboxhall</who>
    <bug_when>2014-12-19 00:18:00 +0000</bug_when>
    <thetext>(In reply to Alice Boxhall from comment #19)
&gt; (In reply to James Craig from comment #10)
&gt; &gt; (In reply to Alice Boxhall from comment #2)
&gt; &gt; &gt; I&apos;m slightly unconvinced about the name &apos;computedLabel&apos; as to me it sounds
&gt; &gt; &gt; like it might return an HTMLLabelElement. Would &apos;computedName&apos; work?
&gt; &gt; 
&gt; &gt; &quot;name&quot; is ambiguous because it means different things across different
&gt; &gt; accessibility APIs and even in host languages. For example, in HTML @name is
&gt; &gt; like a non-unique @id. 
&gt; &gt; 
&gt; &gt; ARIA uses the term &quot;label&quot; consistently, so I&apos;m not convinced this would be
&gt; &gt; a point of confusion for authors. It&apos;s consistent with the meaning used in
&gt; &gt; &lt;label&gt;, @aria-label, @aria-labelledby, and other API uses.
&gt; 
&gt; The algorithm to compute the string which would be returned from this method
&gt; is called the &quot;Accessible Name Calculation&quot; algorithm
&gt; (http://www.w3.org/TR/wai-aria/roles#namecalculation) so I don&apos;t think it&apos;s
&gt; really all that consistent.
&gt; 
&gt; Both &quot;name&quot; and &quot;label&quot; are fairly overloaded at this point, and I think
&gt; &quot;name&quot; better represents this concept - see also the general accessibility
&gt; concept of Name (in the context of Name, Role, State and Value), e.g.
&gt; http://www.w3.org/TR/UNDERSTANDING-WCAG20/ensure-compat-rsv.html

Also, the &quot;nameFrom&quot; property in the ARIA spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116538</commentid>
    <comment_count>21</comment_count>
    <who name="Alice Boxhall">aboxhall</who>
    <bug_when>2014-12-19 00:27:25 +0000</bug_when>
    <thetext>(In reply to steve faulkner from comment #14)
&gt; (In reply to Philip Jägenstedt from comment #11)
&gt; &gt; What should computedRole do that would require spinning up additional
&gt; &gt; accessibility code? Isn&apos;t it simply the first recognized token in the role
&gt; &gt; attribute, or the default role of the element failing that?
&gt; &gt; 
&gt; &gt; Is falling back to the default role of the element important? That detail
&gt; &gt; increases the amount of testing required by a lot, as it brings in
&gt; &gt; https://html.spec.whatwg.org/#wai-aria and any other vocabulary-specific
&gt; &gt; mapping tables.
&gt; 
&gt; wondering whether getComputedrole will return ARIA abstract of elements
&gt; accessibility API mapping? If so what is done in cases where there is no
&gt; ARIA equivalent (of which there are many).

I think it should, yes. In the case where there is no ARIA equivalent, I think it makes sense to return null.

&gt; Also currently role mappings are only represented in acc APIs as ARIA role
&gt; values , when the ARIA role value is used by the APIs because their is not
&gt; an acc API equivalent, most landmark roles, for example.

True, but knowing the computed ARIA role in other cases means that we can reason about what native accessibility API role will be chosen, if necessary, as there is a standard mapping. The ARIA role set gives us a consistent cross-platform API.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116540</commentid>
    <comment_count>22</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-12-19 01:02:20 +0000</bug_when>
    <thetext>I think we just need to add ARIA roles for all of the mappings that don&apos;t have them yet. It&apos;s pretty ridiculous that the only way I can get IA2_ROLE_PARAGRAPH is with a &lt;p&gt; element, and I can&apos;t do it with the `role` attribute. In general we don&apos;t want browsers reserving such capabilities for their own list of privileged elements.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116542</commentid>
    <comment_count>23</comment_count>
    <who name="Alice Boxhall">aboxhall</who>
    <bug_when>2014-12-19 02:43:06 +0000</bug_when>
    <thetext>(In reply to Domenic Denicola from comment #22)
&gt; I think we just need to add ARIA roles for all of the mappings that don&apos;t
&gt; have them yet. It&apos;s pretty ridiculous that the only way I can get
&gt; IA2_ROLE_PARAGRAPH is with a &lt;p&gt; element, and I can&apos;t do it with the `role`
&gt; attribute. In general we don&apos;t want browsers reserving such capabilities for
&gt; their own list of privileged elements.

I agree, but I don&apos;t see how that affects this proposal.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116545</commentid>
    <comment_count>24</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-19 08:38:33 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #13)
&gt; I tested this just now, className and id have moved to Element in Blink,
&gt; Gecko and WebKit. Only IE is left.

Yes, the properties have, but what about class=&quot;&quot; and id=&quot;&quot;? Fairly certain they are not universally supported.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116546</commentid>
    <comment_count>25</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-19 08:40:56 +0000</bug_when>
    <thetext>(In reply to Alice Boxhall from comment #23)
&gt; I agree, but I don&apos;t see how that affects this proposal.

It does if we want to make .role return the mapping that ends up being used, but accept a sequence of mappings as input. It would be weird for it to return something you cannot set. And I think that&apos;s the only API that makes sense for .role, similar to &lt;input&gt;.type.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116556</commentid>
    <comment_count>26</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-19 14:21:19 +0000</bug_when>
    <thetext>(In reply to Alice Boxhall from comment #18)
&gt; (In reply to Philip Jägenstedt from comment #17)
&gt; &gt; (In reply to Dominic Mazzoni from comment #16)
&gt; &gt; &gt; The main use-case I have in mind is feature/capability detection. As new
&gt; &gt; &gt; ARIA roles are added, and more generally as the ARIA spec improves, web
&gt; &gt; &gt; authors need a way to determine whether a particular user agent supports
&gt; &gt; &gt; those features, and provide a polyfill if not.
&gt; &gt; &gt; 
&gt; &gt; &gt; In the case of ARIA roles, a computedRole() interface would allow a web app
&gt; &gt; &gt; to determine whether a particular role is recognized, and if not provide an
&gt; &gt; &gt; appropriate substitute. While there&apos;s existing support for listing multiple
&gt; &gt; &gt; roles, the interaction between ARIA roles in the DOM hierarchy is pretty
&gt; &gt; &gt; important and web authors might want more control over them.
&gt; &gt; 
&gt; &gt; Would a static boolean isRoleSupported(DOMString role) suffice for this
&gt; &gt; purpose? That seems like the simplest possible API for detecting support for
&gt; &gt; a role, and seems trivial to implement.
&gt; 
&gt; This

Not sure if this was copypasta or if your reply was truncated :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116575</commentid>
    <comment_count>27</comment_count>
    <who name="Alice Boxhall">aboxhall</who>
    <bug_when>2014-12-19 22:26:42 +0000</bug_when>
    <thetext>(In reply to Philip Jägenstedt from comment #26)
&gt; (In reply to Alice Boxhall from comment #18)
&gt; &gt; (In reply to Philip Jägenstedt from comment #17)
&gt; &gt; &gt; (In reply to Dominic Mazzoni from comment #16)
&gt; &gt; &gt; &gt; The main use-case I have in mind is feature/capability detection. As new
&gt; &gt; &gt; &gt; ARIA roles are added, and more generally as the ARIA spec improves, web
&gt; &gt; &gt; &gt; authors need a way to determine whether a particular user agent supports
&gt; &gt; &gt; &gt; those features, and provide a polyfill if not.
&gt; &gt; &gt; &gt; 
&gt; &gt; &gt; &gt; In the case of ARIA roles, a computedRole() interface would allow a web app
&gt; &gt; &gt; &gt; to determine whether a particular role is recognized, and if not provide an
&gt; &gt; &gt; &gt; appropriate substitute. While there&apos;s existing support for listing multiple
&gt; &gt; &gt; &gt; roles, the interaction between ARIA roles in the DOM hierarchy is pretty
&gt; &gt; &gt; &gt; important and web authors might want more control over them.
&gt; &gt; &gt; 
&gt; &gt; &gt; Would a static boolean isRoleSupported(DOMString role) suffice for this
&gt; &gt; &gt; purpose? That seems like the simplest possible API for detecting support for
&gt; &gt; &gt; a role, and seems trivial to implement.
&gt; &gt; 
&gt; &gt; This
&gt; 
&gt; Not sure if this was copypasta or if your reply was truncated :)

It was a reply I didn&apos;t mean to send; I was blindsided by Bugzilla!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116576</commentid>
    <comment_count>28</comment_count>
    <who name="Alice Boxhall">aboxhall</who>
    <bug_when>2014-12-19 22:40:17 +0000</bug_when>
    <thetext>(In reply to Anne from comment #25)
&gt; (In reply to Alice Boxhall from comment #23)
&gt; &gt; I agree, but I don&apos;t see how that affects this proposal.
&gt; 
&gt; It does if we want to make .role return the mapping that ends up being used,
&gt; but accept a sequence of mappings as input. It would be weird for it to
&gt; return something you cannot set. And I think that&apos;s the only API that makes
&gt; sense for .role, similar to &lt;input&gt;.type.

I see. I think `role` would be best simply reflecting the string &quot;role&quot; attribute verbatim, regardless of what is applied - this is why we need `computedRole` as, as you point out, this may be quite different to `role` or even return a value if `role` is not set.

Regarding reflecting ARIA attributes: there have been proposals kicking around for this on the PFWG bug tracker (https://www.w3.org/WAI/PF/Group/track/issues/438) for some time - if this is something we&apos;d like to discuss here, I can file a separate bug for it as I think these distinct (albeit related) issues (since, as Dominic points out, we can always use getAttribute to get the verbatim string attribute).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116602</commentid>
    <comment_count>29</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-20 09:48:14 +0000</bug_when>
    <thetext>(In reply to Alice Boxhall from comment #28)
&gt; I see. I think `role` would be best simply reflecting the string &quot;role&quot;
&gt; attribute verbatim, regardless of what is applied - this is why we need
&gt; `computedRole` as, as you point out, this may be quite different to `role`
&gt; or even return a value if `role` is not set.

That seems like a bogus design. Why have .role do that? That seems perfectly serviced through getAttribute()/setAttribute(). When possible we make IDL attributes useful and it seems we can make this one perfectly useful, just need to fix the design of role=&quot;&quot; a bit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>125977</commentid>
    <comment_count>30</comment_count>
    <who name="Arron Eicholz">arronei</who>
    <bug_when>2016-04-20 21:28:19 +0000</bug_when>
    <thetext>HTML5.1 Bugzilla Bug Triage: 

This bug constitutes a request for a new feature of HTML. Our current guidelines, rather than track such requests as bugs or issues, is to create a proposal for the desired behavior, or at least a sketch of what is wanted (much of which is probably contained in this bug), and start the discussion/proposal in the WICG (https://www.w3.org/community/wicg/). As your idea gains interest and momentum, it may be brought back into HTML through the Intent to Migrate process (https://wicg.github.io/admin/intent-to-migrate.html).</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>