Skip to content

Toolbar toggler accessibility #37889

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

Merged
merged 1 commit into from
Aug 21, 2020

Conversation

Chi-teck
Copy link
Contributor

@Chi-teck Chi-teck commented Aug 19, 2020

Q A
Branch master
Bug fix yes
New feature no
Deprecations no
Tickets Fix #37739
License MIT

@Chi-teck
Copy link
Contributor Author

The PR does not combines toggler links into a single button as was suggested in
#37739 (comment) because it would require rewriting a good amount of profiler CSS code which is out of scope of that ticket. Overall I think it makes sense though as the toggler would not loose focus when controlled via keyboard.

For the record, I believe the front-end part of the profiler needs deep refactoring. Using floats with clearfix hack in 2020 seems odd and fallbacks for classList and EventListener are not really needed nowadays. Dropping support for old IE versions would make CSS/JS part of the profiler a lot simpler and cleaner.

@fabpot fabpot force-pushed the toolbar-toggler-accessibility branch from 908e030 to 4333dd0 Compare August 21, 2020 06:53
@fabpot
Copy link
Member

fabpot commented Aug 21, 2020

Thank you @Chi-teck.

@fabpot fabpot merged commit a80dbc5 into symfony:master Aug 21, 2020
@stof
Copy link
Member

stof commented Aug 21, 2020

@Chi-teck the toolbar itself is intentionally keeping compat with old browsers, because it gets injected into the page. If it were broken in older browsers, it would forbid using Symfony to build apps supporting these older browsers (as you would not be able to test your page in those browsers locally due to the Symfony debug tools). The JS for the profiler pages is using newer features

@Chi-teck
Copy link
Contributor Author

@stof addEventListener works even in IE9 which I think was already "old browser" ~5 years ago. Nowadays I would consider it is an ancient browser. Another point here is that Web profiler intended for local development, it should never go to production. And developers tend to use bleeding edge technologies. I cannot image someone developing Symfony 5 application on IE8.

Anyway, it would be useful to establish browser support policy. That would help contributers to understand what browser APIs are allowed in CSS and JS code. That would require defining some heuristics like this.
https://www.drupal.org/project/drupal/issues/3080068

@stof
Copy link
Member

stof commented Aug 21, 2020

@Chi-teck someone needed to support older browsers will generally need to use the old browser locally at some point when debugging issues specific to it. If the injected symfony toolbar breaks the page, it makes this debugging impossible.

The fact that we expect developers to use a modern browser is the reason why the code for profiler pages (which are separate pages that you don't need to open in your IE8 where you debug IE compatibility) can be written using ES6 classes for instance.

The hard thing with the toolbar is that it gets injected into the page itself, and so it must respect the intended browser support of that page... which we have no control over.

@fabpot fabpot mentioned this pull request Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix accessibility of toolbar toggler
5 participants