Skip to content

fix(ui): name label class controls for accessibility - #849

Merged
giswqs merged 2 commits into
mainfrom
fix/label-class-accessibility
Oct 24, 2026
Merged

giswqs merged 2 commits into
mainfrom
fix/label-class-accessibility

Conversation

@giswqs

@giswqs giswqs commented Oct 24, 2026

Copy link
Copy Markdown
Member

The native UI tests fail after #789 because the new Class chooser has no accessible name. Associate the chooser and its rename input with the Class row label, so screen readers can identify both controls and the accessibility checks pass.

Extend the existing row-label regression check to cover the Class chooser. Follow-up to #789; the failing run is https://github.com/opengeos/RustGIS/actions/runs/40131457394.

Validation: pre-commit run --all-files passes. The native tests are being rerun locally and in CI.

Label the class chooser and rename input with their Class row.
Extend the input-label regression check to cover the chooser.
@coderabbitai

coderabbitai Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 2 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 4a02f625-007f-4b06-86e7-c91e093a5fc4
Commits

Reviewing files that changed from the base of the PR and between 0ef9f3e and 5e6b6d7.

Files selected for processing: 1
  • crates/ui-egui/src/labelpane.rs
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

Code review

I found no bugs, security issues, performance problems or AGENTS.md violations in this PR. It only touches crates/ui-egui/src/labelpane.rs.

What changed

  • The "Class" label now names both the class combo box and the rename text box for screen readers. It uses the same labelled_by(input_label.id) pattern the file already uses for Field, Font, Size and the others (lines 319, 373, 466, 515 and 534).
  • rename_box takes a new label: egui::Id parameter. It has a single caller, which is updated.
  • The ComboBox call chain was reformatted, with no logic change.
  • The test now also expects a ComboBox role labelled "Class". The doc comment on font_italic_and_line_placement_edit_the_chosen_class was reworded to describe the behaviour.

Checked

  • Never crash: the diff adds no unwrap, expect, panic or unsafe.
  • Translation: the "Class" label is still wrapped in tl!.
  • Accessibility: .response.labelled_by(...) on the InnerResponse from show_ui is the right way to label the combo box. The ID comes from the label response created in the same grid row, so it is stable across frames.
  • Layering and wasm: no new dependencies and no platform-specific code.

Bugs

None found.

Security

None found.

Performance

None found.

Quality

  • Low confidence, nit: rename_box now takes seven parameters, which is a lot. This is fine for now, and bundling the arguments could wait until the next time it grows.

AGENTS.md

No violations found.

Change size

Compared: the whole PR against main (merge base 0ef9f3e to PR head 4981793)

Metric Value
Files changed 1 (added 0, modified 1, removed 0, renamed 0)
Size before 62.8 KB
Size after 63.1 KB
Total size change +282 B
File Before After Change
crates/ui-egui/src/labelpane.rs 62.8 KB 63.1 KB +282 B

@github-actions

Copy link
Copy Markdown

📖 Docs preview

Item Value
Preview https://preview.rustgis.app/pr-849/
Web app https://preview.rustgis.app/pr-849/app/
Commit 4981793

GitHub Pages takes a minute or two to publish a new commit.

Initialize the font index in the shared pane fixture to avoid the
loading button and layout changes racing accessibility assertions.
@github-actions

Copy link
Copy Markdown

Code review

I found nothing worth raising. The change is a small accessibility fix in crates/ui-egui/src/labelpane.rs, and I only read the diff and grepped the repo. I did not build the code or run the tests.

  • Accessibility fix: The "Class" row label now names both the class ComboBox and the rename TextEdit, using .labelled_by(input_label.id). The rest of the crate already labels controls the same way (s3ui.rs, workspacepanes.rs, ribbon.rs, timebar.rs). I saw no logic or edge-case problems. The rename path just carries the label id in as an extra parameter.
  • Test: "Class" is added to the existing row-label ComboBox regression check, so the fix is covered.
  • Test setup: families::installed() moves into the shared with_cities() helper, so every test using it has the font picker ready. The effect is deterministic setup and less flakiness.
  • Doc comment: The doc comment on the font/italic test was reworded to say what it checks. That is more accurate.
  • Never crash: The diff adds no unwrap, expect, panics or unsafe.
  • Interface text: The "Class" label already goes through tl!.
  • Assets: No assets or dependencies change.
  • Formatting: The ComboBox chain is reformatted (rustfmt-style), which makes the diff look larger than it is.
  • Minor nit, low confidence: rename_box now takes seven parameters, and clippy's too_many_arguments limit is 7. That is at the limit rather than over it, so it should pass -D warnings. Grouping key and label would be needed if it grows further.

Change size

Compared: the whole PR against main (merge base 0ef9f3e to PR head 5e6b6d7)

Metric Value
Files changed 1 (added 0, modified 1, removed 0, renamed 0)
Size before 62.8 KB
Size after 63.2 KB
Total size change +378 B
File Before After Change
crates/ui-egui/src/labelpane.rs 62.8 KB 63.2 KB +378 B

@giswqs
giswqs merged commit 7448b13 into main Oct 24, 2026
17 of 18 checks passed
@giswqs
giswqs deleted the fix/label-class-accessibility branch October 24, 2026 21:16
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