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

Use mark instead of span #75

Closed
wants to merge 16 commits into from
Closed

Conversation

@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch from 757c147 to 6bbd6bd Compare November 20, 2023 17:47
@RoyEJohnson RoyEJohnson marked this pull request as ready for review November 20, 2023 20:26
@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch from eb8e345 to cfc0ab6 Compare November 20, 2023 21:02
Copy link
Member

@TomWoodward TomWoodward left a comment

Choose a reason for hiding this comment

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

responded to comments on the issue

@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch from cfc0ab6 to 7af5df5 Compare December 18, 2023 21:27
@Malar-Natarajan
Copy link

@RoyEJohnson Could you please get this deployed somewhere. I believe highlighter does not get a direct deployment link like rex-web.

@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch from 1af3ac7 to 7af5df5 Compare February 8, 2024 23:06
@Malar-Natarajan
Copy link

Testing link: openstax/rex-web#2158

@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch 5 times, most recently from 5a33dee to d7a26d9 Compare March 20, 2024 17:40
@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch from d7a26d9 to 4296d75 Compare March 20, 2024 18:18
@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch from f87a4fc to 4f61498 Compare March 22, 2024 20:56
@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch from 8b94268 to 7869c30 Compare April 15, 2024 22:15
It seems that some offsets needed to be recalculated due to removing screenreader nodes.
@RoyEJohnson RoyEJohnson requested a review from TomWoodward April 16, 2024 16:33
@RoyEJohnson
Copy link
Author

@TomWoodward The last four commits take care of issues created by removing the actual screenreader nodes and using pseudoelements instead.

Copy link
Member

@TomWoodward TomWoodward left a comment

Choose a reason for hiding this comment

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

you can probably remove the failing tests for very old versions of nodejs

src/Highlight.ts Outdated
public addFocusedStyles(): Highlight {
this.elements.forEach((el: HTMLElement) => el.classList.add(FOCUS_CSS));
this.elements.forEach((el: HTMLElement) => {
el.setAttribute('aria-current', 'true');
Copy link
Member

Choose a reason for hiding this comment

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

do you have any literature about aria-current ? i don't know much about it but the mdn page makes it seem like it might be meant for a current element in a discrete list, and i'm concerned that our mark elements are spread over the whole content and not in a group like that

Copy link
Author

Choose a reason for hiding this comment

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

I can take aria-current out. (It certainly shouldn't bearia-selected.)
The screenreader should distinguish start-selected-highlight vs start-highlight and maybe that's all it needs.

Copy link
Author

Choose a reason for hiding this comment

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

I have updated the Highlighter branch to remove aria-current and restore the old focus class (for CSS selection purposes). A Rex branch for testing it is here

Copy link
Member

Choose a reason for hiding this comment

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

is it not updated in this PR?

Copy link
Author

Choose a reason for hiding this comment

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

Whoops, forgot to push. This PR is updated now.

@RoyEJohnson RoyEJohnson force-pushed the use-mark-instead-of-span branch from 72beac0 to 6384d5f Compare May 17, 2024 19:47
@RoyEJohnson
Copy link
Author

I think the changes in this branch went too far. I have another branch which I hope will be less trouble.

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