You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Service for handling keyboard vs. mouse focus behavior #289
Currently, we always show a focus effect on the button component, when there was no mouse event the last 100ms.
This is really hard-coded and there are bugs. For example, switching browser tabs, is restoring focus and showing the focus-effect (should not happen).
A service for interaction, which detects the last interaction type would solve that issue very elegant and would be also helpful for other components.
I also implemented that in Material 1 (still pending after re-submit) and I would like to implement it in Material 2 as well.
So let me know if you need this, and I will implement it :)
@devversion yeah, this would be nice to have. I think the better solution is to set a flag on touchstart / mousedown and use that on the focus event. Is that what your approach in ng1 did?
But this is an old approach and is not working probably anymore.
For example, if you click on a button and then you switch browser tabs, then the browser restores the focus (- but no mousedown event is triggered), so the button will become the md-focused class. (not valid)
I also created an issue on Material 1 a few days ago. Please take a look at it and the accompanying PR.
Just want to reference a few things here. The focus is currently accidentally showing up on Desktop Browsers, because the current workaround with the timeout is not working properly.
Once the Interaction Service will be approved / land, we will fix the following components:
Activity
[-]a11y: interaction service [/-][+]Service for handling keyboard vs. mouse focus behavior[/+]jelbourn commentedon Apr 12, 2016
@devversion yeah, this would be nice to have. I think the better solution is to set a flag on
touchstart/mousedownand use that on thefocusevent. Is that what your approach in ng1 did?devversion commentedon Apr 12, 2016
@jelbourn - This is what we currently do in Material 1 and Material 2.
But this is an old approach and is not working probably anymore.
For example, if you click on a button and then you switch browser tabs, then the browser restores the focus (- but no
mousedownevent is triggered), so the button will become themd-focusedclass. (not valid)I also created an issue on Material 1 a few days ago. Please take a look at it and the accompanying PR.
This service tracks the last interaction type and allows us to provide perfect accessibility on some components.
jelbourn commentedon Apr 12, 2016
Having a service would be good. Feel free to put together a PR!
devversion commentedon Apr 13, 2016
@jelbourn Awesome, will start that tomorrow 👍
feat(): add interaction service for a11y
feat(): add interaction service for a11y
feat(): add interaction service for a11y
devversion commentedon May 24, 2016
Just want to reference a few things here. The focus is currently accidentally showing up on Desktop Browsers, because the current workaround with the timeout is not working properly.
Once the Interaction Service will be approved / land, we will fix the following components:
cc. @jelbourn
csabattilas commentedon Dec 9, 2016
Hi, It looks that the radio focus indicator is still broken or not there. Where can i take a look on this how to fix it or add this feature? thanks
devversion commentedon Mar 5, 2017
This should be fixed with the new
focus-classesdirective.fix(example-viewer): don't wrap code samples (angular#289)
angular-automatic-lock-bot commentedon Sep 5, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.