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

Atomic move operation for element reparenting & reordering #211

Open
w3cbot opened this issue Oct 16, 2024 · 1 comment
Open

Atomic move operation for element reparenting & reordering #211

w3cbot opened this issue Oct 16, 2024 · 1 comment
Assignees
Labels
s:dom missing link tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response from a11y whatwg https://whatwg.org/

Comments

@w3cbot
Copy link

w3cbot commented Oct 16, 2024

This is a tracker issue. Only discuss things here if they are a11y group internal meta-discussions about the issue. Contribute to the actual discussion at the following link:

§ whatwg/dom#1255

@w3cbot w3cbot added pending Issue created by the tracker tool and may need to be refined s:dom missing link tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response from a11y labels Oct 16, 2024
@matatk matatk removed the pending Issue created by the tracker tool and may need to be refined label Oct 16, 2024
@w3cbot w3cbot added the whatwg https://whatwg.org/ label Oct 22, 2024
@niklasegger
Copy link

niklasegger commented Oct 23, 2024

In modern web applications and pages, there are often iFrames that need to be moved in the DOM from A to B or lists that can be reordered by the user - just to name two examples. From a technical point of view, these elements must first be removed from the DOM and then reinserted in the desired position. As a result, the elements lose their state as well as their focus/selection. As the issue thread shows, the consequence for many developers and frontend frameworks is to implement their own work arounds, some of which have disadvantages. In one iFrame example, it is explicitly mentioned that the accessibility tree breaks due to the work around.

The desired introduction of native atomic move operations, for example in the form of a new API, should make it possible to move the elements without these negative side effects and without the overhead for the developer. With regard to the examples mentioned, this also makes sense from an accessibility perspective. If the iFrame content loses the scroll position and returns to the top of the loaded page, this can certainly be confusing for some user groups and should therefore be avoided.

Moreover, the API must be compatible with ARIA. For example, when some content is moved into an Aria-Live component. As atomic moves and the general implementation are quite low-level and beyond my expertise, I don't know if this is automatically taken into account and works out of the box. I haven't read anything about ARIA in the discussions, so I wanted to write it down here to be on the safe side.

Another case I can think of is when you move a list entry from list A (“Do”) to list B (“Done”) and the focus is kept. In this case, the usual screen reader information should be read out, just as if you had tabbed into the second list normally.

Maybe out of scope, but I had to think of „WCAG 3.2.1 On Focus“ and „3.2.2 On Input“ when reading the thread. Because of the possibility of sudden focus changes i.e. when the focused element is moved to a different location. If the API progresses and a W3C document is created, these points should probably be listed in the accessibility section.

I hope my thoughts make sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:dom missing link tracker Group bringing to attention of a11y, or tracked by the a11y Group but not needing response from a11y whatwg https://whatwg.org/
Projects
None yet
Development

No branches or pull requests

3 participants