AخA
<p class="hidden">I am an element no human should encounter under current conditions.</p>
<p class="assistive">I am an element that adds some extra information for people who can't see some kind of visual cue.</p>
CSS Helpers for hiding and "visually hiding" content.
API status: | general |
---|---|
Included in AUI core? | Yes. You do not need to explicitly require the web resource key. |
Web resource key: |
com.atlassian.auiplugin:ajs
|
AMD Module key: | N/A |
Experimental API: | 3.2 |
General API: | 4 |
Simply apply the hidden or assistive class to the element. No
other code is required. Works well with jQuery toggleClass()
.
hidden
removes the element - it is not available to any user (it applies display:
none;
)
assistive
hides the element from visual display, but leaves it in the document; meaning it is still
available to screen readers (it applies the same clip:rect hiding solution as
HTML5 Boilerplate.
<p class="hidden">I am an element no human should encounter under current conditions.</p>
<p class="assistive">I am an element that adds some extra information for people who can't see some kind of visual cue.</p>
If this is an unfamiliar technique, some further reading may be useful: