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

Separation of style and content #3778

Open
annevk opened this issue Mar 29, 2019 · 5 comments

Comments

Projects
None yet
5 participants
@annevk
Copy link
Member

commented Mar 29, 2019

Forgive this somewhat philosophical question. I'm a little curious at where we draw the line these days.

Given that various non-visual features in browsers nevertheless use the result of layout (e.g., AT, find-in-page in some implementations, focus), can we still argue that separation of style and content exists? (Or have we already given up on that?)

What stops us from going even further, e.g., annotating elements with ARIA roles and properties through CSS?

@alice alice referenced this issue Mar 29, 2019

Closed

Alternative Text for CSS Generated Content #351

2 of 5 tasks complete
@Crissov

This comment has been minimized.

Copy link
Contributor

commented Mar 29, 2019

Circular dependency perhaps?

[foo=bar] {attribute: "foo" "quuz";} 

That is not to say that it would be a bad idea to reuse Selectors and perhaps CSS Syntax for an attribute association language.

@bkardell

This comment has been minimized.

Copy link

commented Mar 29, 2019

? If you unset the UI sheet you might 'technically' get content but it would be 99% unusuable to actual humans I think.

  • We definitely have talked about reasons to explain underlying magic to CSS to allow it to express in a similar way but have different implications to do things like set attributes (@tabatkins had a cascading attribute sheets proposal I think) but I think very fitting would be less about setting aria attributes here but maybe something lower/more AOM like in a way more like CSS custom properties?

To @annevk's original post I kind of wonder about it a little more nuanced that I read his question - so while I am not sure how starkly he means it I am myself very curious in asking "perhaps we have over-stressed some things and would it be helpful (I think yes) for the WG to examine and articulate a more finessed philosophy here that accounts for a lot of history, practice and reality since that allow us to resolve a lot of things and give us good practical paths forward"?

@tabatkins

This comment has been minimized.

Copy link
Member

commented Mar 29, 2019

Yeah, Cascading Attribute Sheets, a simple scripting language that uses CSS syntax to apply attributes to elements on the page. I seriously proposed it back in 2012, but it didn't go anywhere.

@alice

This comment has been minimized.

Copy link
Contributor

commented Mar 30, 2019

I think it's a false dichotomy in any case to assume that the accessibility tree, focus, find in page etc. shouldn't depend on style. These experiences are and should be fundamentally based on the end result of layout, rendering etc, not the un-styled markup. It would make no sense for an element with display: none to take focus, for example.

For what my opinion is worth here, I think of the separation of style and content as more of a pragmatic progressive enhancement issue than a strict separation issue. Things should work ok without style, and probably better with style; they're unlikely to be the same experience, but they should be comparable (which is a useful term from the inclusive design sphere).

To me that helps draw a line around what information belongs in style and what doesn't - does this belong to the baseline experience or the styled experience? I could conceive of a case where a role only makes sense in the context of a style, and the page works OK without it (for example, applying a non-widget ARIA role to a pseudo-element).

@bkardell

This comment has been minimized.

Copy link

commented Apr 4, 2019

Many, many things in #3775 seem related to me. Sites, even specs I think, use generated content for things that if you don't announce or when they don't appear in copy/paste operations seem problematic in actual practice now that we have had time to live with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.