HTML5 hidden attribute fails if styles are disabled

UNCONFIRMED
Unassigned

Status

()

UNCONFIRMED
5 years ago
5 years ago

People

(Reporter: jeroen, Unassigned)

Tracking

23 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

5 years ago
Created attachment 790153 [details]
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.
(Reporter)

Updated

5 years ago
OS: Windows XP → All
Hardware: x86 → All
(Reporter)

Updated

5 years ago
Attachment #790153 - Attachment mime type: text/plain → text/html

Updated

5 years ago
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

Comment 2

5 years ago
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.
You need to log in before you can comment on or make changes to this bug.