Skip to content

DSD-1901: Remove role="search" from Searchbar #1807

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

Merged
merged 3 commits into from
May 12, 2025

Conversation

7emansell
Copy link
Collaborator

@7emansell 7emansell commented Apr 28, 2025

Fixes JIRA ticket DSD-1901

This PR does the following:

  • Removes search role from Searchbar component wrapper
  • Updates tests, docs

How has this been tested?

Accessibility concerns or updates

  • Accessibility update meant to allow devs to set search landmark correctly (usually includes more elements than just the Searchbar)

Accessibility Checklist

  • Checked Storybook's "Accessibility" tab for color contrast and other issues.
  • The feature works with keyboard inputs including tabbing back and forward and pressing space, enter, arrow, and esc keys.
  • For hidden text or when aria-live is used, a screenreader was used to verify the text is read.
  • For features that involve UI updates and focusing on DOM refs, focus management was reviewed.
  • The feature works when the page is zoomed in to 200% and 400%.

Open Questions

Checklist:

  • I have updated the Storybook documentation and changelog accordingly.
  • I have added relevant accessibility documentation for this pull request.
  • All new and existing tests passed.

Front End Review:

  • Review the Vercel preview deployment once it is ready.

Copy link

vercel bot commented Apr 28, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nypl-design-system ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 29, 2025 6:06pm

Copy link
Member

@EdwinGuzman EdwinGuzman left a comment

Choose a reason for hiding this comment

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

All looks good, but a minor request on the doc page.

| ----------------- | ---------- |
| Added | `0.0.4` |
| Latest | `3.6.1` |
| Component Version | DS Version |
Copy link
Member

Choose a reason for hiding this comment

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

Since you're already updating this doc page.... can you include the new layout styles? Use the ComponentDocsHeader component and check Banner (https://nypl-design-system-git-reservoir-v4-nypl.vercel.app/?path=/docs/components-feedback-banner--docs) for an example of the new order for storybook doc pages.

<ComponentDocsHeader
category="Form element"
componentName="SearchBar"
summary="A form container with text input and button that submits a search query"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🤨 Don't know if this is a valid summary

Copy link
Member

Choose a reason for hiding this comment

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

Or something along the lines of "a multi-component based UI for searching..." @bigfishdesign13 ?

Copy link
Member

@EdwinGuzman EdwinGuzman left a comment

Choose a reason for hiding this comment

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

I'm not too concern about the summary right now.

<ComponentDocsHeader
category="Form element"
componentName="SearchBar"
summary="A form container with text input and button that submits a search query"
Copy link
Member

Choose a reason for hiding this comment

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

Or something along the lines of "a multi-component based UI for searching..." @bigfishdesign13 ?

Copy link
Collaborator

@oliviawongnyc oliviawongnyc left a comment

Choose a reason for hiding this comment

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

This looks good to me, but the ticket says "document how should be used instead." Does this mean should be used instead of role="search"? Are we no longer recommending that?

@7emansell
Copy link
Collaborator Author

This looks good to me, but the ticket says "document how should be used instead." Does this mean should be used instead of role="search"? Are we no longer recommending that?

We're still recommending using role = search (in #1806) but rarely (if ever) would it be correctly used on just the Searchbar component, so we want to stop enforcing that incorrect usage @oliviawongnyc

@bigfishdesign13 bigfishdesign13 added Ship It Pull requests that have been reviewed and approved. v4 Updates for the v4.0 feature branch labels May 7, 2025
@7emansell 7emansell merged commit 2bacf0e into reservoir-v4 May 12, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ship It Pull requests that have been reviewed and approved. v4 Updates for the v4.0 feature branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants