Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDSC-4349: Adjustments to spatial filter dropdowns and buttons #1846

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dpesall
Copy link
Member

@dpesall dpesall commented Jan 2, 2025

Overview

What is the feature?

Ensuring the spatial buttons and consistent in both order and style, and adding aria-labels to them.

What is the Solution?

Updating the icons for spatial filter buttons to all match the same visual style. Making the spatial dropdown filters be left-aligned. Adding aria-labels to all the spatial filter buttons.

What areas of the application does this impact?

  • Spatial Filter Dropdown
  • Leaflet Spatial Filter Buttons

Testing

Reproduction steps

  1. Verify that the Spatial Filter Dropdown is left aligned and that the styles and order match the leaflet buttons.
  2. Ensure all buttons still work as expected.

Attachments

Screenshot 2025-01-02 at 1 48 45 PM

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.78%. Comparing base (1362ddd) to head (ea785b0).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1846      +/-   ##
==========================================
- Coverage   93.80%   93.78%   -0.02%     
==========================================
  Files         778      778              
  Lines       18888    18900      +12     
  Branches     4849     4888      +39     
==========================================
+ Hits        17717    17726       +9     
+ Misses       1123     1099      -24     
- Partials       48       75      +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

onClick={() => onItemClick('polygon')}
label="Select Polygon"
aria-label="Select Polygon"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think we need labels or aria labels on all of these these dropdown items, since they are text buttons and the text tells the user what they will be selecting

const buttons = drawToolbar.querySelectorAll('.leaflet-draw-draw-circle, .leaflet-draw-draw-polygon, .leaflet-draw-draw-rectangle, .leaflet-draw-draw-marker')
buttons.forEach((button) => {
if (button.classList.contains('leaflet-draw-draw-circle')) {
button.setAttribute('aria-label', 'Search by spatial circle')
Copy link
Collaborator

Choose a reason for hiding this comment

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

These should read "Draw a [spatial method] on the map to select a spatial extent"

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