Skip to content

🎨 Palette: Async action aria-label updates - #197

Closed
seonghobae wants to merge 1 commit into
mainfrom
feature/aria-label-loading-states-14844363829498536628
Closed

🎨 Palette: Async action aria-label updates#197
seonghobae wants to merge 1 commit into
mainfrom
feature/aria-label-loading-states-14844363829498536628

Conversation

@seonghobae

@seonghobae seonghobae commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Closed as superseded by #162. This branch also has an unresolved review finding: repeated setLoading() calls can overwrite the stored original aria-label, preventing correct restoration. Any unique viewer-label behavior should be reimplemented after #162 without that state bug.

- Add dynamic aria-label to table action buttons for screen readers (e.g. "Details for file.pdf").
- Dynamically update and restore aria-label during loading and refreshing states in demo.js and viewer.js.
- Document loading state aria-label practices in .jules/palette.md.
Copilot AI review requested due to automatic review settings July 23, 2026 21:38
@google-labs-jules

Copy link
Copy Markdown

👋 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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Improves accessibility in the Clearfolio viewer/demo front-end by adding (and temporarily updating) more descriptive aria-labels for action buttons/links, especially in repeated table actions and during async “loading/refreshing” states to avoid screen-reader context loss.

Changes:

  • Add optional aria-label support to demo table action helpers (createActionButton, createLink) and include file-name-specific labels for repeated actions.
  • Update async button flows in demo.js to temporarily change aria-label alongside “Loading…/Refreshing…/Submitting…” text and restore afterward.
  • Update viewer.js loading/error/ready flows to preserve/restore the refresh button’s aria-label, and document the learning in .jules/palette.md.

Reviewed changes

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

File Description
src/main/resources/static/assets/viewer/viewer.js Preserve/restore refresh button aria-label across loading/error/ready states.
src/main/resources/static/assets/viewer/demo.js Add file-name-specific aria-labels for repeated table actions and sync labels during async state text changes.
.jules/palette.md Record guidance about updating/restoring aria-label during loading state text changes.

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

Comment on lines +53 to +59
const originalAriaLabel = el.retryBtn.getAttribute("aria-label");
el.retryBtn.dataset.originalAriaLabel = originalAriaLabel || "";
el.retryBtn.disabled = true;
el.retryBtn.textContent = "Refreshing...";
if (originalAriaLabel) {
el.retryBtn.setAttribute("aria-label", "Refreshing...");
}
}
if (job.jobId) {
actionsCell.appendChild(createLink(`/viewer/${encodeURIComponent(job.jobId)}`, "Open viewer"));
actionsCell.appendChild(createLink(`/viewer/${encodeURIComponent(job.jobId)}`, "Open viewer", `Open viewer for ${fileName}`));
@seonghobae seonghobae closed this Aug 4, 2026
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.

2 participants