Skip to content

🎨 Palette: Enhanced Note List Accessibility and Editor UX#3

Merged
davidraehles merged 3 commits intomainfrom
palette-accessibility-improvements-9932565411486648363
Feb 18, 2026
Merged

🎨 Palette: Enhanced Note List Accessibility and Editor UX#3
davidraehles merged 3 commits intomainfrom
palette-accessibility-improvements-9932565411486648363

Conversation

@davidraehles
Copy link
Copy Markdown
Collaborator

This PR implements several micro-UX and accessibility improvements to the Secure Notes app:

  1. Keyboard Accessibility: Note items in the sidebar are now focusable and selectable using the keyboard (Enter or Space keys).
  2. Visual Focus Indicators: Added high-contrast :focus-visible outlines to note items to clearly show which note is currently focused.
  3. Screen Reader Support: Added descriptive aria-label attributes to note items, delete buttons, and editor inputs. Added role="button" and aria-current to the note list.
  4. Editor Polish: Creating a new note now automatically focuses the "Note title" input, allowing for immediate typing.
  5. Code Cleanup: Removed an unused Note import in NoteEditor.tsx to resolve a lint error.

All changes are contained within approximately 41 lines of code across three files.


PR created automatically by Jules for task 9932565411486648363 started by @davidraehles

- Add keyboard navigation (tabIndex, role="button", onKeyDown) to note list
- Add :focus-visible styles for better visual feedback
- Add auto-focus to title input on new note creation
- Add ARIA labels to improve screen reader support
- Fix unused import lint error in NoteEditor.tsx

Co-authored-by: davidraehles <6085055+davidraehles@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 18, 2026 18:48
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Copy link
Copy Markdown

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 improves the Secure Notes frontend’s keyboard/screen-reader accessibility for the note list and adds minor editor UX polish (auto-focus on new note), alongside a small cleanup to fix a lint issue.

Changes:

  • Makes sidebar note items keyboard-focusable/selectable and adds ARIA attributes for SR support.
  • Adds high-contrast :focus-visible styling for note items (including the active state).
  • Auto-focuses the editor title field when creating a new note; removes an unused type import.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
frontend/src/views/NoteList.tsx Adds keyboard handlers + ARIA labeling to custom note list items; adds delete button ARIA label.
frontend/src/views/NoteEditor.tsx Adds title input auto-focus on “New Note” and ARIA labels; removes unused Note type import.
frontend/src/index.css Adds :focus-visible outline styling for .note-item (and active variant).
.Jules/palette.md Adds internal notes documenting the accessibility approach used.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +46 to +51
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
handleNoteClick(note);
}
}}
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The note item’s onKeyDown handler will also fire when the Delete is focused because keydown events bubble. This means pressing Enter/Space on the Delete button can trigger handleNoteClick(note) (and e.preventDefault may also interfere with the button’s native activation). Consider ignoring events where e.target !== e.currentTarget, or stopping propagation from the Delete button’s key handlers, so keyboard users can delete without also selecting the note.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added if (e.target !== e.currentTarget) return; at the start of the keydown handler to prevent Enter/Space on the Delete button from bubbling up and triggering note selection.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excellent point. I've added the check to ensure that only key events directly on the note item trigger selection, preventing bubbling from nested buttons.

Comment on lines +52 to +55
tabIndex={0}
role="button"
aria-label={`Note: ${note.title || 'Untitled'}`}
aria-current={currentNote?.id === note.id ? 'true' : undefined}
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

Using role="button" + tabIndex on a

that contains another interactive element () creates nested interactive controls, which can be confusing for assistive tech and complicates keyboard event handling. If possible, restructure so the selectable note is a real / (or use a semantic list with a child button) and keep the delete button as a separate control.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Removed role="button" from the note item div to eliminate nested interactive controls. The div retains tabIndex={0}, onClick, onKeyDown, and aria-label for keyboard and mouse accessibility without creating an invalid nested button-in-button structure.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch! Removing role="button" avoids the invalid nested interactive element structure while maintaining keyboard accessibility via tabIndex and the onKeyDown handler.

Comment on lines +81 to +85
ref={titleInputRef}
type="text"
className="note-title-input"
placeholder="Note title"
aria-label="Note title"
Copy link

Copilot AI Feb 18, 2026

Choose a reason for hiding this comment

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

The title/content fields are now explicitly focus-managed (auto-focus on New Note), but the CSS currently removes focus outlines for .note-title-input and .note-content-input without providing an alternative. This makes keyboard focus hard to see. Consider adding a :focus-visible style (or removing outline: none) so the focused editor field is visually indicated.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Added :focus-visible styles for both .note-title-input and .note-content-input with a 2px solid black outline. The :focus rule still removes outlines for mouse/touch users, while :focus-visible restores them for keyboard navigation.

OpenCode and others added 2 commits February 18, 2026 21:14
- Prevent keydown event bubbling from nested buttons in NoteList
- Remove invalid nested role="button" from NoteList items
- Maintain keyboard accessibility via tabIndex and custom onKeyDown handler

Co-authored-by: davidraehles <6085055+davidraehles@users.noreply.github.com>
@davidraehles davidraehles merged commit 3468bbe into main Feb 18, 2026
davidraehles added a commit that referenced this pull request Feb 18, 2026
…6-7-8-10-11-12-13-14

Merge PRs #1, #2, #3, #4, #5, #6, #7, #8, #10, #11, #12, #13, #14 into main
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.

3 participants