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

Do we want to map inline divs as spans and block spans as divs? #183

Closed
joanmarie opened this issue May 1, 2019 · 4 comments
Closed

Do we want to map inline divs as spans and block spans as divs? #183

joanmarie opened this issue May 1, 2019 · 4 comments
Assignees

Comments

@joanmarie
Copy link
Contributor

If an author takes a div and CSSes it into being inline and looking like a span, should it still be mapped as if it were a div? Similarly, if an author turns a span into a block element via CSS so that it functions like it were a div, should it still be mapped as a span?

In other words, do we want to (continue to) base our mapping on the official element, or on how it is functioning? I'm leaning towards the latter, but I think we all need to weigh in and discuss.

Related: As part of ARIA's role parity work, we will be creating a generic role to which div and span (and other block and inline elements) will correspond. The question is how we should map them in the Core-AAM. And we want to be aligned with HTML-AAM.

@stevefaulkner
Copy link
Contributor

@joanmarie if as I suspect display:block vs display:inline is a deciding factor on how they are represented in the accessibility tree, then it makes sense to map them based on these values.

@scottaohara
Copy link
Member

We would need to take into consideration other display values too then, no?
e.g. display: inline-block or flex....etc?

Or is it more a question of "inline" vs "not-inline" that we need to be mindful of?

@stevefaulkner
Copy link
Contributor

Doing a quick test of various display values using this https://www.w3schools.com/cssref/playit.asp?filename=playcss_display&preval=inline looks like the are variances across browsers as to effect and yes I think we need to take this into account, to try to get convergence/agreement on effect across browsers.

@JAWS-test
Copy link

JAWS-test commented Sep 13, 2019

I don't think it's a good idea to consider CSS properties. So far there has been a relatively clear separation between them:

  • HTML code = semantic markup, relevant for assistive technology
  • CSS = visual design, not relevant (with a few exceptions like display:none).

I think it would be good to keep this separation. Otherwise it becomes endless: why should display:inline/block/inline-block etc. only be relevant for span and div and not for all other HTML elements. And why only display and not other CSS properties? Like float (see FreedomScientific/standards-support#247). And when span and div get different rules regarding the labeling (#160), it gets even more complex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants