Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hidden elements #5

Open
Nettsentrisk opened this issue Mar 12, 2015 · 4 comments
Open

Hidden elements #5

Nettsentrisk opened this issue Mar 12, 2015 · 4 comments

Comments

@Nettsentrisk
Copy link

I'm wondering whether hidden elements should be part of the outline. Depends on how you use the tool.

If it's to see the current document structure as a screen reader or browser would parse it, hidden elements should not be part of the outline.

Maybe there should be a setting or something in the plugin for this.

By hidden elements I mean those that a screen reader would not read out; computed CSS with display: none.

@dominykas
Copy link
Member

This plugin implements the outlining as defined in the HTML spec: http://www.w3.org/TR/html5/sections.html#outline. So, the request to ignore elements with "display: none;" is a valid one, but really does belong over there. I'm pretty sure they've also discussed it...

However, it is worth noting, that the algorithm does ignore the elements with a hidden attribute: http://www.w3.org/TR/html5/editing.html#the-hidden-attribute

Honestly, I do not think it's a good idea to implement this request per se, because it mixes presentational (CSS) and markup (HTML) data, but I think it might be worth highlighting in the outline that a section (and maybe its header) is fully invisible due to display:none (what do screen readers do about visibility:hidden?), so keeping this open.

@Eccenux
Copy link

Eccenux commented Jun 25, 2015

hidden has the same meaning as display:none in practice for all automatic readers (readers test). In fact it's safer to manipulate display as it has wider browser support:
http://caniuse.com/#feat=hidden

@dominykas
Copy link
Member

I don't think I agree that it has the same meaning. For one, it's CSS and not HTML - that alone gives it a completely different context.

And like I mentioned before - the algorithm does not define this, so I'm reluctant to make it [not a] part of the outline.

@Nettsentrisk
Copy link
Author

The hidden attribute is HTML and not CSS, and semantically means that this element should not be shown/read to the user. For that reason it should be a part of the algorithm determining what to have in the outline.

As for elements hidden with CSS (display: none), that's a different issue. You may want to provide the option of visually fading these out or in some other way signifying that these parts of the outline aren't visible to the user with the currently loaded CSS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants