Skip to content

[css-display][css-aam] Is the 'display' value supposed to affect the semantics exposed to screen readers? #2355

Closed
@SelenIT

Description

Adrian Roselli recently raised the very important issue that setting non-table display value to HTML <table> element, as well as setting display:table to other elements than <table> , can affect the way these elements are presented to the screen readers (and thus should be avoided).

For me, this seems to be directly contradicting to the purpose of CSS in terms of the Separation of Concerns principle (at least, as I always understood it). For me, one of the biggest advantages of CSS is being able to express any meaning with proper markup in HTML without need to change the presentation, and vice versa. I used to think of the possibility to get the table-like look without adding table semantics in certain circumstances, or improving the visual layout of the data table with CSS Grid formatting options not available for the CSS Table visual model, as a great Progressive Enhancement feature. As an author, I hope that the semantics of my code is defined by the markup part, and styling shouldn't affect it (at least, not that much).

So, for me, this behavior of the browsers and screen readers feels like a bug. There are some bugs about this filed for Firefox ([1], [2]), one of which has been resolved already, and in the discussions under these bugs there seems to be the agreement that in general authors don't want the meaning of the markup change because of the display value. Unfortunately, there is apparently no data about how this behavior helps users (if at all).

Shouldn't the effect of changing the display property on the semantics — or the absence of such effect
— be specified anywhere, in order to improve web interoperability and reduce confusion in the future? I guess that the best place for that would be the CSS Display spec, which already briefly mentions some interaction between the display values and aural styles in the introduction.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions