Skip to content

Conversation

hxrshxz
Copy link

@hxrshxz hxrshxz commented Oct 5, 2025

Resolves

Changes:

Updated JSDoc documentation for textOutput() and gridOutput() in src/accessibility/outputs.js to clearly document known limitations.

PR Checklist

…iling known limitations and alternatives for accessible canvas descriptions.
@Copilot Copilot AI review requested due to automatic review settings October 5, 2025 03:48
Copy link

welcome bot commented Oct 5, 2025

🎉 Thanks for opening this pull request! For guidance on contributing, check out our contributor guidelines and other resources for contributors!
🤔 Please ensure that your PR links to an issue, which has been approved for work by a maintainer; otherwise, there might already be someone working on it, or still ongoing discussion about implementation. You are welcome to join the discussion in an Issue if you're not sure!
🌸 Once your PR is merged, be sure to add yourself to the list of contributors on the readme page !

Thank You!

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the JSDoc documentation for the textOutput() and gridOutput() accessibility methods by adding comprehensive information about their known limitations and recommending alternative approaches.

  • Added detailed documentation of limitations for both methods (English-only descriptions, WEBGL incompatibility, shape detection issues)
  • Recommended describe() and describeElement() as more accurate alternatives
  • Improved developer awareness of when these methods may not work as expected

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Collaborator

@perminder-17 perminder-17 left a comment

Choose a reason for hiding this comment

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

Hi, I think the points you mentioned are technically very correct but I think it sounds little odd as compared to other reference. Please keep a neutral, helpful tone for docs.

Comment on lines 40 to 53
* `textOutput()` has several known limitations. Descriptions are only
* generated in English. Text drawn with <a href="#/p5/text">text()</a> is
* not described. `textOutput()` does not work with WEBGL mode or 3D shapes.
* 2D primitives rendered in WEBGL may be described incorrectly because the
* camera's perspective is not accounted for. Shapes with similar features may
* be combined in descriptions, resulting in inaccurate counts. Shapes
* positioned outside the canvas boundaries are described as though they're
* visible. Custom 2D shapes created with
* <a href="#/p5/beginShape">beginShape()</a> are not described.
*
* <a href="#/p5/describe">describe()</a> and
* <a href="#/p5/describeElement">describeElement()</a> provide more accurate
* and flexible alternatives for writing canvas descriptions.
*
Copy link
Collaborator

@perminder-17 perminder-17 Oct 6, 2025

Choose a reason for hiding this comment

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

Avoid absolute or negative phrasing like “does not work” and “inaccurate counts.” Prefer “not supported” and “may be imprecise.” Also, Keep a neutral, helpful tone. Also, the sketches in textOutputif you see 3rd and 4th are not working. https://p5js.org/reference/p5/textOutput/ Can this be fixed in your PR as well?

Copy link
Author

Choose a reason for hiding this comment

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

Sure , On it !

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.

2 participants