Skip to content

Polish preview accessibility and UX - #97

Merged
Frotty merged 4 commits into
masterfrom
agent/ci-private-dependency-mocks
Aug 7, 2026
Merged

Polish preview accessibility and UX#97
Frotty merged 4 commits into
masterfrom
agent/ci-private-dependency-mocks

Conversation

@Frotty

@Frotty Frotty commented Aug 7, 2026

Copy link
Copy Markdown
Member

What changed

  • Add keyboard interaction and focus styling to MPQ archive rows.
  • Preserve MPQ folder expansion state when clearing filters.
  • Make asset-browser cards and tabs keyboard accessible.
  • Add asset-browser dialog semantics, focus trapping, and focus restoration.
  • Add keyboard-controlled object-list splitter resizing with ARIA values.
  • Improve loading, error, status, and alert semantics across preview surfaces.
  • Restore keyboard access to model-preview help.

Why

This completes the UX/accessibility polish pass for the MPQ viewer, object editor asset browser, model preview, and shared preview states.

Validation

  • npm test
  • npx tsc -p . --noEmit
  • npm run lint (existing unrelated webpack warning only)
  • npm run compile-web
  • git diff --check

@Frotty
Frotty force-pushed the agent/ci-private-dependency-mocks branch from dc648c7 to 17c7d64 Compare August 7, 2026 16:49
@Frotty
Frotty marked this pull request as ready for review August 7, 2026 16:49

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 17c7d649b4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/webview/mpqViewerWebview.ts
Comment thread src/webview/objModEditor/assetBrowser.ts Outdated
Comment thread src/webview/objModEditorWebview.ts
Comment thread src/webview/objModEditorWebview.ts Outdated

Frotty commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

1 similar comment

Frotty commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9a05075b3c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +254 to +256
const focusable = Array.from(modal.querySelectorAll<HTMLElement>(
'button:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',
)).filter(el => !el.hidden && el.offsetParent !== null);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Exclude inactive tabs from the modal focus list

When any tab other than Models is active, the inactive Models button has tabIndex = -1 but still matches button:not([disabled]), so it is incorrectly treated as the first focusable element. Consequently, Shift+Tab from the actual active tab does not trigger the wrap condition and focus can escape the aria-modal asset browser; filter candidates by their effective tabIndex or explicitly exclude [tabindex="-1"] from every selector branch.

Useful? React with 👍 / 👎.

Comment thread src/webview/mpqViewerWebview.ts Outdated
Comment on lines +224 to +225
row.setAttribute('role', 'button');
row.tabIndex = 0;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Keep the Open button outside the row button

For every file entry, assigning role="button" to the row creates an interactive button that contains the native Open button added later. This produces conflicting nested button semantics: assistive technologies can flatten button descendants, making the distinct Open action undiscoverable, while the outer control itself performs different actions for Space and Enter. Represent the selectable row with an appropriate non-button item role or place the Open button outside that interactive control.

Useful? React with 👍 / 👎.

Frotty commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 40819da1d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/features/blpPreview.ts Outdated
</div>
<canvas id="gizmo" class="gizmo" width="80" height="80"></canvas>
<div id="loadingOverlay" class="wv-loading-overlay visible">
<div id="loadingOverlay" class="wv-loading-overlay visible" role="status" aria-live="polite" aria-busy="true">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Hide the loading status after loading completes

When an image or model finishes loading, setLoading(false) only removes .visible and sets aria-busy="false"; the shared CSS hides the overlay using opacity alone, so this new role="status" remains in the accessibility tree with stale text such as “Loading image...”. Screen-reader users can therefore continue to encounter a loading status after the preview is ready; toggle aria-hidden or otherwise remove the completed overlay from the accessibility tree.

Useful? React with 👍 / 👎.

Frotty commented Aug 7, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: 98f38ffb33

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Frotty
Frotty merged commit 5538fd8 into master Aug 7, 2026
1 check passed
@Frotty
Frotty deleted the agent/ci-private-dependency-mocks branch August 7, 2026 18:50
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.

1 participant