Skip to content

Conversation

@StephDriver
Copy link
Member

@StephDriver StephDriver commented Oct 3, 2025

In b-4890-loop-a11y-syntax while updating list syntax for loops across the theme, I updated the citation modals too. But on testing Clarity I found this breaks the copy citation function in two ways. First it places lists inside a span, which is invalid HTML and so they end up with an empty span and the lists afterwards. But the copy button is aiming at the span element, so effectively, it copies nothing. Changing out the span for a div doesn't work either, as having a list inside when copy/pasting ends up with bullets being added in when pasting into word.

So the best solution seems to be to revert the original change just for citation_modals.html which was fortunately on a single commit. I have also made the same change to Clarity in #5000.

This PR reverts 55fa11f a11y: #4890 update non-visible list syntax on clean

@ajrbyers
Copy link
Member

In b-4890-loop-a11y-syntax while updating list syntax for loops across the theme, I updated the citation modals too. But on testing Clarity I found this breaks the copy citation function in two ways. First it places lists inside a span, which is invalid HTML and so they end up with an empty span and the lists afterwards. But the copy button is aiming at the span element, so effectively, it copies nothing. Changing out the span for a div doesn't work either, as having a list inside when copy/pasting ends up with bullets being added in when pasting into word.

So the best solution seems to be to revert the original change just for citation_modals.html which was fortunately on a single commit. I have also made the same change to Clarity in #5000.

This PR reverts 55fa11f a11y: #4890 update non-visible list syntax on clean

@ajrbyers ajrbyers closed this Oct 23, 2025
@ajrbyers ajrbyers reopened this Oct 23, 2025
Copy link
Member

@ajrbyers ajrbyers left a comment

Choose a reason for hiding this comment

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

Can I suggest having a hidden plain text version of this that the copy button can target? That way the syntax can remain for screenreaders and the copy/paste will work without inserting bullets?

@ajrbyers ajrbyers assigned StephDriver and unassigned ajrbyers Oct 23, 2025
@StephDriver
Copy link
Member Author

Can I suggest having a hidden plain text version of this that the copy button can target? That way the syntax can remain for screenreaders and the copy/paste will work without inserting bullets?

I am not convinced (yet) because:

  1. this will still cause the same copy/paste problem for anyone who manually copies the citation rather than use the copy button.
  2. If we include list markup inside a citation, then the screen reader will be announcing that list and offering navigation on it - which interrupts and distracts from the specific word order, punctuation and styling of the citation.

Perhaps we could discuss this further @ajrbyers ?

@StephDriver
Copy link
Member Author

@ajrbyers I think we discussed this and I convinced you - if not could you add here what you want me to do?

@StephDriver StephDriver assigned ajrbyers and unassigned StephDriver Nov 24, 2025
@StephDriver StephDriver requested a review from ajrbyers November 24, 2025 07:55
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.

3 participants