Skip to content

[css-display][css-ui] Should outline apply to elements with 'display: contents'? #3323

Open
@fantasai

Description

@fantasai

François Remy wrote:

I think outline should work on display contents elements. Just like it works if an online gets split into lines or bidi or even regions or by a block-in-inline. I think the element should be focusable and tab-focusable too, but only if it is not replaced or a shadow host or none of its descendants in the light tree produce a box. The elements in cases noted above behave as if they were display none and should therefore not be focusable. Besides outline and a few other properties like pointer-event, properties should have no effect on the elements that do generate boxes for their descendants, besides being inherited by default.

I think a case can be made here.

Outlines may be non-rectangular. For example, if the element is broken across several lines, the outline should be an outline or minimum set of outlines that encloses all the element’s boxes.

The parts of the outline are not required to be rectangular. To the extent that the outline follows the border edge, it should follow the border-radius curve.

The position of the outline may be affected by descendant boxes.

Now to the question "does the spec say you should have an outline in that case" I'd say probably no. Whether it should say so is another question. You will have to answer these questions anyway when working on exposing these elements to assistive technologies. If these elements are there for semantic purposes, they must be exposed, and you will somehow need to synthetize something for them.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions