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

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-display][css-ui] Should outline apply to elements with 'display: contents'? ==
[François Remy wrote](https://github.com/w3c/csswg-drafts/issues/2632#issuecomment-393062411):

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


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3323 using your GitHub account

Received on Wednesday, 14 November 2018 23:05:56 UTC