<?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>23389</bug_id>
          
          <creation_ts>2013-09-28 02:46:18 +0000</creation_ts>
          <short_desc>The implementation symantics of the HTML hidden=&quot;hidden&quot; attribute vs CSS display:none are not clear and in fact conflict</short_desc>
          <delta_ts>2016-04-22 20:17:13 +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>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>a11y</keywords>
          <priority>P2</priority>
          <bug_severity>editorial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>scunliffe.bugzilla</reporter>
          <assigned_to name="steve faulkner">faulkner.steve</assigned_to>
          <cc>arronei</cc>
    
    <cc>chaals</cc>
    
    <cc>faulkner.steve</cc>
    
    <cc>lwatson</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>w3bugs</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>93990</commentid>
    <comment_count>0</comment_count>
    <who name="">scunliffe.bugzilla</who>
    <bug_when>2013-09-28 02:46:18 +0000</bug_when>
    <thetext>From the current draft: http://www.w3.org/html/wg/drafts/html/master/single-page.html#the-hidden-attribute

&quot;User agents should not render elements that have the hidden attribute specified.&quot;

As stated implies that user agents would be &quot;in error&quot; if displaying elements when this attribute is specified.

&lt;side_rant&gt;I presume there is a good accessibility reason for this new attribute but at the moment as a developer I only see trouble. I would love to see a clear indication as to why this addition is even needed in the first place.&lt;/side_rant&gt;

I&apos;ve created a jsbin demo showing the confusing behavior as it is currently implemented in browsers (Firefox &amp; Chrome from my testing)

http://jsbin.com/IKohIXe/3/edit

In short since this new HTML attribute is currently &quot;duplicating&quot; the same behavior as the CSS property developers now have 2 &apos;methods&apos; of changing the physical rendering of elements yet the 2 accessors are not kept in sync and the true state of an element&apos;s display is not maintained causing &quot;dirty data&quot; when inspected.

In the test case above if an element was served up with hidden=&quot;hidden&quot; but later JavaScript sets the CSS style &quot;display:block&quot; on the element the element becomes visible... however the hidden attribute that implies that it is not visible remains and HTMLElement.hidden returns true.

1.) Excluding any accessibility issues (which I&apos;m presuming was the impetus for this feature addition in the first place) I don&apos;t see any helpful use for this attribute.
2.) IMHO, if the display of an element is altered to show through CSS the hidden attribute (if kept) should be removed from the DOM.
3.) If it was not the intention that the hidden attribute and the CSS display property were to affect each other in any way... then the current browser implementations do not match the intentions.
4.) As a developer it is already confusing enough with both the CSS display and visibility properties (especially when display can be &quot;block|inline|{empty_string}|table-row|inline-block&quot; etc.) adding yet another layer of the element is: &quot;maybe, kinda, sorta-ish&quot; hidden doesn&apos;t seem helpful at all to me.

Due to the inconsistencies I&apos;ve already deemed use of this attribute verboten within my developer teams on Web Projects and from conversations with other developers the feeling is mutual.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93994</commentid>
    <comment_count>1</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2013-09-28 07:53:51 +0000</bug_when>
    <thetext>this appears at first glance to be an browser implementation bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93997</commentid>
    <comment_count>2</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2013-09-28 15:05:32 +0000</bug_when>
    <thetext>I have filed a bug on Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=921738 to get some implementer feedback. It may be that the spec is unclear and needs clarification or it may be that browsers need to fix their implementation.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93998</commentid>
    <comment_count>3</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2013-09-28 18:24:51 +0000</bug_when>
    <thetext>(In reply to steve faulkner from comment #2)
&gt; I have filed a bug on Firefox
&gt; https://bugzilla.mozilla.org/show_bug.cgi?id=921738 to get some implementer
&gt; feedback. It may be that the spec is unclear and needs clarification or it
&gt; may be that browsers need to fix their implementation.

so it would seem that it is not considered a bug by one person at Mozilla:
https://bugzilla.mozilla.org/show_bug.cgi?id=921738#c1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>93999</commentid>
    <comment_count>4</comment_count>
    <who name="steve faulkner">faulkner.steve</who>
    <bug_when>2013-09-28 18:32:57 +0000</bug_when>
    <thetext>note this brings up an issue in reference to the mapping of hidden to aria-hidden</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>120948</commentid>
    <comment_count>5</comment_count>
    <who name="Charles McCathieNevile">chaals</who>
    <bug_when>2015-06-12 14:48:46 +0000</bug_when>
    <thetext>Looks like this is related to 19159</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126054</commentid>
    <comment_count>6</comment_count>
    <who name="Arron Eicholz">arronei</who>
    <bug_when>2016-04-22 20:17:13 +0000</bug_when>
    <thetext>HTML5.1 Bugzilla Bug Triage: won&apos;t fix, based on the feedback from https://bugzilla.mozilla.org/show_bug.cgi?id=921738 and the understanding that HTML and CSS are disconnected systems I don&apos;t think this should be changed.

If this resolution is not satisfactory, please copy the relevant bug details/proposal into a new issue at the W3C HTML5 Issue tracker: https://github.com/w3c/html/issues/new where it will be re-triaged. Thanks!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>