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

table-text in accessibility options breaks sketch #7612

Closed
1 task done
prossel opened this issue Mar 8, 2025 · 2 comments
Closed
1 task done

table-text in accessibility options breaks sketch #7612

prossel opened this issue Mar 8, 2025 · 2 comments

Comments

@prossel
Copy link

prossel commented Mar 8, 2025

Most appropriate sub-area of p5.js?

  • Accessibility

p5.js version

1.11.1

Web browser and version

Firefox 135.0.1

Operating system

macOS, Windows, whatever

Steps to reproduce this

Actual Behavior

This simple sketch in editor.p5js.org is breaking if the table-text option in enabled in accessibility configuration.

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  
  line(10, 10, 100, -100)
}

Here is the error message:

TypeError: cells[ingredients[x][y].loc.locY] is undefined
at undefined:53353:93

🌸 p5.js says:
[p5.js, line 53353] Cannot read property of undefined. Check the line number in error and make sure the variable which is being operated is not undefined.

  • More info: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cant_access_property#what_went_wrong
    ┌[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js:53353:93]
    Error at line 53353 in _gridMap()
    └[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js:53318:34]
    Called from line 53318 in [286]</_main.default.prototype._updateGridOutput()
    └[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js:53870:20]
    Called from line 53870 in [287]</_main.default.prototype._updateAccsOutput()
    └[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js:79142:22]
    Called from line 79142 in [318]</_main.default.prototype.redraw()
    └[https://cdnjs.cloudflare.com/ajax/libs/p5.js/1.11.1/p5.js:66335:23]
    Called from line 66335 in [306]</p5/this._draw()

Expected Behavior

No error, even with the table-text option enabled

Steps to reproduce

Steps:

  1. Open a new sketch on editor.p5js.org
  2. Pate the code below
  3. Enable the table-text option in Accessibility preferences
  4. Run and see the error

Snippet:

function setup() {
  createCanvas(400, 400);
}

function draw() {
  background(220);
  
  line(10, 10, 100, -100)
}

Note

This issue was first reported in the editor repository
processing/p5.js-web-editor#3373
but it appears it should rather belong here.

@prossel prossel added the Bug label Mar 8, 2025
Copy link

welcome bot commented Mar 8, 2025

Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, please make sure to fill out the inputs in the issue forms. Thank you!

@davepagurek
Copy link
Contributor

Thanks @prossel! I'm marking this issue as a duplicate as we also have discussion about the same issue in #7259. Feel free to let us know in that issue if you're interested in helping fix it!

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

2 participants