[go: nahoru, domu]

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/revise popover related attribute mappings #481

Closed
wants to merge 26 commits into from

Conversation

scottaohara
Copy link
Member
@scottaohara scottaohara commented May 9, 2023

this commit supersedes #446

TODO: finalize popover attribute mappings


Preview | Diff

this commit supersedes #446

TODO: finalize `popover` attribute mappings
@scottaohara scottaohara changed the title revise popover related attribute mappings add/revise popover related attribute mappings May 9, 2023
index.html Outdated Show resolved Hide resolved
webkit-commit-queue pushed a commit to WebKit/WebKit that referenced this pull request Jun 3, 2023
…state to assistive technologies

https://bugs.webkit.org/show_bug.cgi?id=257666
rdar://105425310

Reviewed by Chris Fleizach.

Per w3c/html-aam#481, buttons with the
`popovertarget` attribute and valid associated popover should expose
expanded state to assistive technologies.

This commit implements that, and also submits a notification to ATs when
a popover is expanded and collapsed.

* LayoutTests/accessibility/mac/expanded-notification-expected.txt:
* LayoutTests/accessibility/mac/expanded-notification.html:
Popover testcase added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::onPopoverTargetToggle):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::popoverTargetElement const):
* Source/WebCore/accessibility/AccessibilityNodeObject.h:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsExpanded const):
(WebCore::AccessibilityObject::isExpanded const):
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::popoverTargetElement const):
* Source/WebCore/html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::handlePopoverTargetAction const):

Canonical link: https://commits.webkit.org/264852@main
mnutt pushed a commit to movableink/webkit that referenced this pull request Jun 28, 2023
…state to assistive technologies

https://bugs.webkit.org/show_bug.cgi?id=257666
rdar://105425310

Reviewed by Chris Fleizach.

Per w3c/html-aam#481, buttons with the
`popovertarget` attribute and valid associated popover should expose
expanded state to assistive technologies.

This commit implements that, and also submits a notification to ATs when
a popover is expanded and collapsed.

* LayoutTests/accessibility/mac/expanded-notification-expected.txt:
* LayoutTests/accessibility/mac/expanded-notification.html:
Popover testcase added.
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::onPopoverTargetToggle):
* Source/WebCore/accessibility/AXObjectCache.h:
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::popoverTargetElement const):
* Source/WebCore/accessibility/AccessibilityNodeObject.h:
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::supportsExpanded const):
(WebCore::AccessibilityObject::isExpanded const):
* Source/WebCore/accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::popoverTargetElement const):
* Source/WebCore/html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::handlePopoverTargetAction const):

Canonical link: https://commits.webkit.org/264852@main
index.html Outdated Show resolved Hide resolved
@scottaohara
Copy link
Member Author

made related follow up #505

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated
<tr>
<th><a href="https://msdn.microsoft.com/en-us/library/dd373608%28v=VS.85%29.aspx">MSAA</a> + <a href="http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/">IAccessible2</a></th>
<td>
<span class="type">Relations:</span> `IA2_RELATION_DETAILS_FOR` points to invoking element
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels weird that we express this as a platform specific relation, but we express popovertarget's details relation as a cross-platform aria-details relation. Is this just because we have no way of expressing reverse relations for ARIA mappings and we want to be explicit here? I wonder whether it'd be better to link to a more general note about implicit reverse relations or something like that.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd be fine with either replacing the cross-platform aria-details relation with the specific platform mappings, or keeping the cross-platform relation and removing the platform specific and replacing with a note about the reverse relations.
over in #359 (which incase you missed, i pinged you for a review) we use the platform specific reverse relations for figure/figcaption. So we can do that here too, or similarly change over in that PR.

Whatever makes the most sense for those that need to read the spec is what I want to do, so just let me know which is preferred.

index.html Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated
<tr>
<th><a href="https://msdn.microsoft.com/en-us/library/dd373608%28v=VS.85%29.aspx">MSAA</a> + <a href="http://accessibility.linuxfoundation.org/a11yspecs/ia2/docs/html/">IAccessible2</a></th>
<td>
<span class="type">Relations:</span> `IA2_RELATION_DETAILS_FOR` points to invoking element
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume this shouldn't happen if we don't expose aria-details due to the invoking element being an immediate sibling or having popovertargetaction=hide? Again, hopefully common sense will prevail, but probably best not to rely on that.

</p>
<p>
If the associated element is an accessibility ancestor of the element with the `popovertarget` attribute:
<a class="core-mapping" href="#ariaExpandedUndefined">`aria-expanded=undefined`</a>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't appear to be implemented in Chromium:
data:text/html,<button popovertarget="pop">tog</button><div id="pop" popover>pop<button popovertarget="pop" popovertargetaction="hide">hide
When the popover is shown, the "hide" button gets the expanded state. If I'm reading this correctly, it shouldn't.
Just to double check, is this definitely what we want and it just hasn't been done in Chromium yet? Or is this still an open question we need to sort out in this PR?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it should not be getting the expanded state for the hide button, this will need to be adjusted in chromium

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have we filed a bug for this?

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
@benbeaudry benbeaudry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@scottaohara
Copy link
Member Author

closing - will be merged via w3c/aria#2219

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.

None yet

5 participants