diff --git a/.Jules/palette.md b/.Jules/palette.md index 5c1c1698..033000b7 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -37,3 +37,7 @@ ## 2026-07-02 - Inline clear buttons preserve focus **Learning:** Inline clear buttons often unmount immediately after clearing state, which can drop keyboard focus to the document body. **Action:** Move focus back to the owning input before clearing state, and cover the behavior with a DOM focus test. + +## 2026-07-20 - Adding aria-disabled styles to UI primitive buttons +**Learning:** While replacing the native `disabled` attribute with `aria-disabled="true"` correctly enables pointer events for tooltips and preserves keyboard tab order, custom primitive components (like ` @@ -305,8 +309,9 @@ export function ScoreViewer({ data, fileName, onStatusChange }: ScoreViewerProps size="icon-lg" className="size-14" aria-label={t("scoreViewerNextPage")} - disabled={pageNumber >= pageCount} - onClick={goToNextPage} + title={t("scoreViewerNextPage")} + aria-disabled={pageNumber >= pageCount ? "true" : undefined} + onClick={pageNumber >= pageCount ? undefined : goToNextPage} >