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

Fix example in ARIA: grid role #37903

Merged
merged 1 commit into from
Feb 1, 2025
Merged

Fix example in ARIA: grid role #37903

merged 1 commit into from
Feb 1, 2025

Conversation

krazy-j
Copy link
Contributor

@krazy-j krazy-j commented Jan 31, 2025

Description

Replace the incorrect use of rowIndex with colIndex in the JavaScript example code for initializing the cell datasets.

Motivation

This error resulted in incorrect row and col values on the cells, causing the navigation to not work correctly. Pressing PageDown resulted in an endless do ... while loop that nearly consumed all of my computer's memory over the next few minutes.

Additional details

It might also be good to add a default: return; case to the "keydown" event to avoid event.preventDefault() for other keys. I think this JavaScript code could use some more improvements to make it more clear and concise, but I'll leave that to someone that is familiar with MDN's code style guidelines.

Replace the incorrect use of `rowIndex` with `colIndex` in the JavaScript example code for initializing the cell datasets.

This error resulted in incorrect `row` and `col` values on the cells, causing the navigation to not work correctly. Pressing PageDown resulted in an endless `do` ... `while` loop that nearly consumed all of my computer's memory over the next few minutes.
@krazy-j krazy-j requested a review from a team as a code owner January 31, 2025 22:11
@krazy-j krazy-j requested review from scottaohara and removed request for a team January 31, 2025 22:11
@github-actions github-actions bot added Content:Accessibility Accessibility docs size/xs [PR only] 0-5 LoC changed labels Jan 31, 2025
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

Thanks! 🎉

Copy link
Contributor

@estelle estelle merged commit 59254d2 into mdn:main Feb 1, 2025
7 checks passed
Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

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

Also, congratulations on your first merged MDN content PR. Welcome to he team!

@krazy-j krazy-j deleted the patch-1 branch February 1, 2025 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Accessibility Accessibility docs size/xs [PR only] 0-5 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants