mysociety / fixmystreet

This is mySociety's popular map-based reporting platform: easy to install in new countries and regions
http://fixmystreet.org/
Other
506 stars 235 forks source link

Improve display of map filters. #5057

Closed lucascumsille closed 2 months ago

lucascumsille commented 2 months ago

This makes them more form-like, and using GOV.UK styling.

The group of filters are now wrapped with a fieldset element. The label and aria-label now match, to comply with WCAG 2.5.3. The upgraded multi select library allows optgroup elements to be turned into fieldsets and adds a proper legend to the fieldset group.

The change made directly to the vendored library in 235931eb to add the for attribute to hidden labels, is now done in a better way.

As the markup order does not match the usual GOV.UK ordering - input is nested inside label here, rathern than label and input as siblings - we use the has() selector, with a fallback in JavaScript.

We lastly tweak the display on /dashboard due to the difference between the heights of default and .js-multiple selects. This can be removed in time once all selfct elements have the same appearance.

Please check the following:

Please check the contributing docs, and describe your pull request here. Screenshots or GIF animations (using e.g. LICEcap) may be helpful.

Please include any issues that are fixed, using "fixes" or "closes" so that they are auto-closed when the PR is merged.

Thanks for contributing!

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 82.62%. Comparing base (c0ce809) to head (9c90530).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #5057 +/- ## ========================================== + Coverage 82.60% 82.62% +0.01% ========================================== Files 395 395 Lines 30849 30869 +20 Branches 4891 4891 ========================================== + Hits 25484 25505 +21 + Misses 3919 3918 -1 Partials 1446 1446 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.