Open Bug 905115 Opened 11 years ago Updated 2 years ago

HTML5 hidden attribute fails if styles are disabled

Categories

(Core :: CSS Parsing and Computation, defect)

23 Branch
defect

Tracking

()

UNCONFIRMED

People

(Reporter: jeroen, Unassigned)

References

()

Details

Attachments

(1 file)

Attached file Hidden.html
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:23.0) Gecko/20100101 Firefox/23.0 (Beta/Release)
Build ID: 20130729175331

Steps to reproduce:

Open the attached HTML file with three paragraphs:
1. One normal paragraph
2. One paragraph with CSS display:none
3. One paragraph with HTML5 hidden attribute


Actual results:

If View -> Page style -> No style is selected from the classic Firefox menu bar, the second and third paragraph become visible.


Expected results:

Unlike the second paragraph, the third paragraph should never be visible, since the HTML5 hidden attribute is no style but reflects semantics.
OS: Windows XP → All
Hardware: x86 → All
Attachment #790153 - Attachment mime type: text/plain → text/html
Component: General → Layout: View Rendering
The rendering effect of @hidden is a stylistic effect, which goes away when styles are disabled...
Component: Layout: View Rendering → CSS Parsing and Computation
IE11 (View / Style / No style) and Opera 12.16 (Page / Style / User mode) do not display hidden elements when styling is disabled.

The implementation of the hidden attribute (bug 567663) followed the example set by webkit. But Chrome does not allow users to disable styling (http://superuser.com/questions/447269/is-there-any-way-to-view-a-webpage-without-styles-in-chrome).

The hidden attribute (http://www.whatwg.org/specs/web-apps/current-work/multipage/editing.html#the-hidden-attribute) is for content that is (a) not relevant at the time or (b) being reused by other parts of the page. The author's concern of page content is orthogonal to the user's concern of page styling. The current implementation in FF couples these concerns. In this respect, the experience of FF users who disable styling is degraded because they see content that is irrelevant or out of context.

The original patch to implement the hidden attribute in html.css was abandoned due to concerns about performance (bug 567663, comment 4) but the performance was not measured (bug 567663, comment 14). Statistics on how many users disable styling would also be relevant.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: