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

Add more condition for wheather the element is focusable or not #147

Merged
merged 1 commit into from Dec 19, 2018

Conversation

jihyerish
Copy link
Collaborator

The conditions that are added are than the previous implementation:

  1. Whether the element is expressly inert or not.
  2. Whether the element is being rendered or not.
    • Reference: [HTML Spec] https://html.spec.whatwg.org/multipage/rendering.html#being-rendered
    • See the detail on isBeingRendered(element)
      : Condition
      • check1. If an element has the style as "visibility: hidden | collapse" or "display: none", it is not being rendered.
      • check2. If an element has the style as "opacity: 0", it is not being rendered.(that is, invisible).
      • check3. If width and height of an element are explicitly set to 0, it is not being rendered.
      • check4. If a parent element is hidden, an element itself is not being rendered. (CSS visibility property and display property are inherited.)

Related to : w3c/csswg-drafts#3395

The conditions that are added are than the previous implementation:
1) Whether the element is expressly inert or not.
   -> See the detail on isExpresslyInert(element)
2) Whether the element is being rendered or not.
  -> See the detail on isBeingRendered(element)
      : the condition
     *  check1. If an element has the style as "visibility: hidden | collapse" or "display: none", it is not being rendered.
     * check2. If an element has the style as "opacity: 0", it is not being rendered.(that is, invisible).
     * check3. If width and height of an element are explicitly set to 0, it is not being rendered.
     * check4. If a parent element is hidden, an element itself is not being rendered. (CSS visibility property and display property are inherited.)
@jihyerish jihyerish merged commit bf3bf2e into master Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant