Skip to content

Consider capturing text inside rectangle or point selections #6974

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

Open
robertknight opened this issue Apr 11, 2025 · 2 comments
Open

Consider capturing text inside rectangle or point selections #6974

robertknight opened this issue Apr 11, 2025 · 2 comments

Comments

@robertknight
Copy link
Member

robertknight commented Apr 11, 2025

If a user uses the rectangle or point annotation tools we don't currently capture a quote selector, which means that you can't see that text in the sidebar or search for it.

It would be useful to capture that text in some form. This could be as a quote selector, or perhaps as part of a new field for alt text for the selected region.

How this would work depends on the shape:

  • For a rectangle selection (or other shape with non-zero area), the text would be the characters inside the annotated region, up to some length limit, or perhaps the words that intersect the selection.
  • For a point selection, the text could be the word (or span of a few words) that contains the point
@robertknight
Copy link
Member Author

If we used the quote selector approach, there are a couple of issues to consider:

  1. Anchoring code needs a policy to handle the case where an annotation has both a shape and a quote selector. For example it could always use the shape for anchoring and fall back to the quote if that fails to anchor.
  2. If we do fall back to the quote, anchoring may not work because the text within the shape may not be continuous in the document's reading order.

@robertknight
Copy link
Member Author

@mkdir-washington-edu recently shared https://www.w3.org/WAI/tutorials/images/decision-tree/ internally. When an image contains text, it recommends using that as the alt value of the image if the real text is not present nearby.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant