Skip to content

data-turbo-stream links should not set aria-busy#681

Merged
dhh merged 1 commit intohotwired:mainfrom
kevinmcconnell:data-turbo-stream-no-busy-state
Aug 16, 2022
Merged

data-turbo-stream links should not set aria-busy#681
dhh merged 1 commit intohotwired:mainfrom
kevinmcconnell:data-turbo-stream-no-busy-state

Conversation

@kevinmcconnell
Copy link
Copy Markdown
Collaborator

Normally when following a link Turbo sets [aria-busy="true"] on the
document element. When the visit is complete, that attribute is removed.

However, when using [data-turbo-stream] to request a stream response
to a link, there is no visit to complete. That presented as a bug where
aria-busy was set at the start of the operation, but never cleared.

To solve this, we avoid setting the aria-busy attribute for links that
have a data-turbo-stream attribute.

Normally when following a link Turbo sets `[aria-busy="true"]` on the
document element. When the visit is complete, that attribute is removed.

However, when using `[data-turbo-stream]` to request a stream response
to a link, there is no visit to complete. That presented as a bug where
`aria-busy` was set at the start of the operation, but never cleared.

To solve this, we avoid setting the `aria-busy` attribute for links that
have a `data-turbo-stream` attribute.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants