<?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>27297</bug_id>
          
          <creation_ts>2014-11-11 10:38:11 +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>2019-03-29 19:35:40 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WHATWG</product>
          <component>HTML</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>Unsorted</target_milestone>
          <dependson>27294</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Pieters">zcorpan</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>annevk</cc>
    
    <cc>d</cc>
    
    <cc>faulkner.steve</cc>
    
    <cc>ian</cc>
    
    <cc>jcraig</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
          
          <qa_contact>contributor</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114783</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Pieters">zcorpan</who>
    <bug_when>2014-11-11 10:38:11 +0000</bug_when>
    <thetext>+++ This bug was initially created as a clone of Bug #27294 +++

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>114859</commentid>
    <comment_count>1</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-11-12 19:14:43 +0000</bug_when>
    <thetext>Wouldn&apos;t this be an ARIA bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116435</commentid>
    <comment_count>2</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-17 21:44:32 +0000</bug_when>
    <thetext>https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/WToTEn4lveY is what I&apos;ve been able to figure out about this.

If I&apos;m correct in guessing that this would fall back to https://html.spec.whatwg.org/#wai-aria then the HTML spec seems like the natural place.

Disclaimer: I know nothing about ARIA.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116445</commentid>
    <comment_count>3</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2014-12-18 01:09:37 +0000</bug_when>
    <thetext>I don&apos;t see what HTML has to do with this. Sure, HTML defines some default semantics. So do, or might, SVG, MathML, HypotheticalRandomNewML, etc. The API has nothing to do with HTML itself as far as I can tell. It&apos;s either an ARIA feature, or maybe a DOM feature, or its own feature, IMHO.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116465</commentid>
    <comment_count>4</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-18 08:32:42 +0000</bug_when>
    <thetext>OK, I&apos;ll suggest shopping around for another spec or writing a new one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116466</commentid>
    <comment_count>5</comment_count>
    <who name="Philip Jägenstedt">philipj</who>
    <bug_when>2014-12-18 08:37:37 +0000</bug_when>
    <thetext>Anne, do you think this would make sense in DOM?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>123015</commentid>
    <comment_count>6</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-09-02 08:43:06 +0000</bug_when>
    <thetext>Ideally this would be defined in the same place that defines

  attribute ? role;

I even think that for role they could be the same feature, using the &quot;limited to known values&quot; thingie.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128747</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2017-07-21 10:44:36 +0000</bug_when>
    <thetext>Since HTML currently doesn&apos;t define either role or aria-* this seems out of scope for the moment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128761</commentid>
    <comment_count>8</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2017-07-21 11:25:10 +0000</bug_when>
    <thetext>The concept of computed role does not rely on the role content attribute. These aspected existed in web content before ARIA was conceived.

For example:
&lt;h1&gt; returns a computed role of &quot;heading&quot; in any browser.
&lt;a href&gt; returns a role of link.


The ARIA roles in the @role attribute can override the default:

&lt;a href&gt; // link
&lt;a href role=&quot;button&quot;&gt; // button

But it will be ignored in some contexts:

&lt;button role=&quot;foo&quot;&gt; // button

Likewise, the fallbacks are computed:

&lt;button role=&quot;switch checkbox&quot;&gt; // &apos;switch&apos; in an ARIA-1.1-capable engine, or &apos;checkbox&apos; in an ARIA-1.0-capable engine</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>128786</commentid>
    <comment_count>9</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2017-07-25 09:36:17 +0000</bug_when>
    <thetext>That&apos;s fair, but currently HTML doesn&apos;t define any of that. It arguably should, but we&apos;d need someone to put in the time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129662</commentid>
    <comment_count>10</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2019-03-29 19:35:40 +0000</bug_when>
    <thetext>https://github.com/WICG/aom</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>