Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

a11y: dialog is always restoring focus. #7963

Closed

Description

@devversion

The dialog is currently always restoring the focus when it's closing.

      function detachAndClean() {
        angular.element($document[0].body).removeClass('md-dialog-is-showing');
        element.remove();

        if (!options.$destroy) options.origin.focus();
      }

This is a weird behavior, when clicking for example on a list-item which opens a dialog as an action.
So if the dialog is closing, then the focus will be restored back to the button inside the list-item, which triggered the ngClick action.

This causes the button, to have a focus effect, which shouldn't be. We're only showing the focus effect if there was no mouse click the last 100ms.

In my opinion, we should have different accessibility actions, when the last interaction was from a keyboard / mouse or touch.

We currently have a PR pending, which adds the required functionality. (#7965)
It was an old PR, and I reworked it again.

This PR would allow fixes for:

cc. @marcysutton @ThomasBurleson @EladBezalel

Activity

  1. self-assigned this
    on Apr 9, 2016
  2. added
    a11y
    on Apr 9, 2016
  3. added
    has: Pull Request
    on Apr 20, 2016
  4. modified the milestone: on Apr 20, 2016
  5. added
    P0: critical
    on Oct 5, 2016
  6. modified the milestones: 1.1.2, - Backlog on Oct 5, 2016
  7. removed
    has: Pull Request
    on Oct 12, 2016
  8. devversion commented on Oct 12, 2016

    @devversion
    MemberAuthor

    Status Update: Pull Request is in and solved the Sidenav issues (as intended) but now I can move on and use the new method for the Button and switches as well.

  9. added a commit that references this issue on Oct 26, 2016
    df99f6e
  10. added
    has: Pull Request
    on Oct 26, 2016
  11. added 2 commits that reference this issue on Oct 26, 2016
    3cb318f
    b8889b6
  12. added a commit that references this issue on Nov 17, 2016
    c851204
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P0: criticala11yhas: Pull Requestui: focus

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions