based on https://w3c.github.io/webdriver/#dfn-disabled
An element element is disabled if the following steps return true:
-
If element is an option element or element is an optgroup element:
-
For each inclusive ancestor ancestor of element:
- If ancestor is an optgroup element or ancestor is a select element, and ancestor is actually disabled, return true.
-
Return false.
-
Return element is actually disabled.
If element is an option element, we will check its inclusive ancestor that are either optgroup or select element. That means it will not checked if the element itself is disabled (since option is not optgroup nor select element).