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

Remove (almost) all usage of keyCode in examples #34122

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

Josh-Cena
Copy link
Member

Most of the files are trivial replacements to code because it makes the most sense as keyboard shortcuts.

Updated deprecation notices to mention both code and key.

The keyup and keydown events for IME are actually non-trivial because keyCode cannot be removed. I've added a note to clarify.

Removed an example in HTMLTextAreaElement that IMO is purely bad UX, and the code is quite obscure anyway.

@Josh-Cena Josh-Cena requested review from a team as code owners June 13, 2024 15:12
@Josh-Cena Josh-Cena requested review from sideshowbarker and estelle and removed request for a team June 13, 2024 15:12
@Josh-Cena Josh-Cena changed the title Remove all usage of keyCode in examples Jun 13, 2024
@github-actions github-actions bot added Content:WebAPI Web API docs Content:Accessibility Accessibility docs Content:Media Media docs Content:Games Games docs Content:Learn:JavaScript Learning area JavaScript docs Content:Learn:HTML Learning area HTML docs Content:Learn:Cross-Browser-Testing Learning area Cross-Browser-Testing docs labels Jun 13, 2024
@Josh-Cena Josh-Cena removed request for a team June 13, 2024 15:12
@github-actions github-actions bot added the size/m [PR only] 51-500 LoC changed label Jun 13, 2024
Copy link
Contributor

Preview URLs (24 pages)
Flaws (30)

Note! 21 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/API/HTMLTextAreaElement
Title: HTMLTextAreaElement
Flaw count: 28

  • macros:
    • /en-US/docs/Web/API/HTMLTextAreaElement/autocomplete does not exist
    • /en-US/docs/Web/API/HTMLTextAreaElement/cols does not exist
    • /en-US/docs/Web/API/HTMLTextAreaElement/defaultValue does not exist
    • /en-US/docs/Web/API/HTMLTextAreaElement/dirName does not exist
    • /en-US/docs/Web/API/HTMLTextAreaElement/disabled does not exist
    • and 23 more flaws omitted

URL: /en-US/docs/Web/API/Element/keydown_event
Title: Element: keydown event
Flaw count: 1

  • macros:
    • /en-US/docs/Glossary/IME does not exist

URL: /en-US/docs/Web/API/Element/keyup_event
Title: Element: keyup event
Flaw count: 1

  • macros:
    • /en-US/docs/Glossary/IME does not exist
External URLs (4)

URL: /en-US/docs/Web/API/Element/keydown_event
Title: Element: keydown event


URL: /en-US/docs/Web/API/Element/keyup_event
Title: Element: keyup event


URL: /en-US/docs/Web/API/KeyboardEvent
Title: KeyboardEvent

@Josh-Cena Josh-Cena merged commit af1e384 into mdn:main Jun 14, 2024
7 checks passed
@Josh-Cena Josh-Cena deleted the rm-keycode branch June 14, 2024 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:Accessibility Accessibility docs Content:Games Games docs Content:Learn:Cross-Browser-Testing Learning area Cross-Browser-Testing docs Content:Learn:HTML Learning area HTML docs Content:Learn:JavaScript Learning area JavaScript docs Content:Media Media docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed
2 participants