Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Separation of style and content #3778
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?
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"?
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
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).