Add invisible buttons for onClick elements

Repository details (talkie)
Project page
talkie
Project log category
(588 entries)
Repository
@joelpurra/talkie
Owner
@joelpurra
Contributors
Contributors on Github
Project status
⏲️ This project has had recent commits.
📂 This project is open.
🌠 This project is popular.
Repository activity period
🗓
Commits
630 commits
Stars
69 stars
Commit details (c1354cd5)
Author
Authored at
Committer
Joel Purra
Committed at

Commit message

Add invisible buttons for onClick elements

  • Having onClick event handlers for (by default) non-interactive elements (for example <p>) can be hard to "detect" in the user interface, and therefore confusing.
  • Adding a <button type="button> wrapper element can help with, for example, keyboard focus as it is a builtin feature.
  • Fixed legalese text click handler to use a fallback language (for automatic voice selection) if the preferred voice (by name) is unavailable.
Raw text
Add invisible buttons for onClick elements

- Having `onClick` event handlers for (by default) non-interactive elements (for example `<p>`) can be hard to "detect" in the user interface, and therefore confusing.
- Adding a `<button type="button>` wrapper element can help with, for example, keyboard focus as it is a builtin feature.
- Fixed legalese text click handler to use a fallback language (for automatic voice selection) if the preferred voice (by name) is unavailable.

Changed files (12)

Path Additions Deletions
code/packages/options-application/src/app/sections/about.tsx +10 -5
code/packages/options-application/src/app/sections/voices.tsx +45 -7
code/packages/options-application/src/app/sections/voices/dialect-voice.tsx +1 -0
code/packages/options-application/src/app/sections/voices/dialect-voices.tsx +3 -1
code/packages/options-application/src/app/sections/voices/dialect.tsx +1 -0
code/packages/options-application/src/app/sections/voices/dialects.tsx +3 -1
code/packages/options-application/src/app/sections/voices/language-group.tsx +2 -0
code/packages/options-application/src/app/sections/voices/language-groups.tsx +3 -1
code/packages/options-application/src/containers/about-container.tsx +23 -12
code/packages/popup-application/src/app/sections/header.tsx +1 -0
code/packages/popup-application/src/app/sections/status.tsx +1 -0
code/packages/shared-ui/src/selectors/voices.mts +14 -0

Commit categories (3)