Zero-edit Change Proposal for ISSUE-95: keep hidden=""
Summary
The hidden="" attribute provides a semantic, declarative, media-independent way for authors to accomplish an extremely common task, and should be included in the core language.
While this change proposal argues for the preservation of this functionality in its present form (a boolean attribute), it takes no position on the best possible name for such an attribute—a point on which much discussion has taken place, and many alternatives proposed.
Rationale
Authors of web documents and applications often need to temporarily hide certain content from readers and users.
Via a combination of script and CSS, such functionality is possible to build today, and there are hundreds of such implementations extant on the web. It's clear that hidden="" Solves Real Problems.
Attempting to implement such functionality with JavaScript and CSS is fundamentally more difficult and error-prone than hidden="". hidden="" is literally the simplest thing that could possibly work, and thus we Avoid Needless Complexity in its design.
By making it as easy as possible to author, and by defining uniform UA behavior (unlike bolt-on scripts which emulate this functionality), we preserve the spec's Priority of Constituencies. Providing such functionality in markup also allows for its use within syndication feeds and other contexts in which HTML is stripped of its associated styles and scripts.
The notion of hiding irrelevant content from users is inherently Media Independent. Bolt-on emulations of hidden="" can fail to correctly hide content in a media-independent way, resulting in a degraded experience for users of aural browsers and other AT tools. hidden="" thus promotes Accessibility more than bolt-on alternatives.
The fact that some content is currently irrelevant is semantic, not presentational, and so we help preserve HTML's Separation of Concerns by providing such functionality in markup, not CSS. As argued by James Graham in an email to public-html, current ATs infer semantics (that content is irrelevant) from CSS. This is a failure of the semantic layer to adequately provide authors with the ability to say what they mean.
If content is really irrelevant, it's irrelevant for all users, not just users of AT, so aria-hidden="" is not an appropriate alternative either. (For this line of argument, I am indebted to Jonas Sicking. He made this argument in an email to public-html.)
Details
No change to the spec.
Impact
Positive Effects
- Reduces incidence of media-dependent, buggy author attempts to emulate such functionality using JavaScript and CSS.
- Makes such functionality available to authors within syndication feeds and other profiles of HTML which forbid scripting and/or styling.
- Results in better overall accessibility in the long term.
Negative Effects
None known.
Conformance Classes Changes
No change.
Risks
None known.