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

Closed
annevk opened this issue Mar 29, 2019 · 7 comments
Closed

Separation of style and content #3778

annevk opened this issue Mar 29, 2019 · 7 comments
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits.

Comments

@annevk
Copy link
Member

annevk 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?

@Crissov
Copy link
Contributor

Crissov 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
Copy link
Contributor

bkardell 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
Copy link
Member

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
Copy link

alice 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
Copy link
Contributor

bkardell 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.

@svgeesus
Copy link
Contributor

@annevk do these responses answer your question, and if not is there a concrete change you want to see (in CSS specs, or in TAG design principles)?

@annevk
Copy link
Member Author

annevk commented Jul 16, 2024

I'm happy to close this. I think as the responses indicate the line has always be somewhat blurry, but overall the separation is useful.

@annevk annevk closed this as not planned Won't fix, can't repro, duplicate, stale Jul 16, 2024
@svgeesus svgeesus added Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed as Question Answered Used when the issue is more of a question than a problem, and it's been answered. Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits.
Projects
None yet
Development

No branches or pull requests

6 participants