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

Enhancements for Better Accessibility and Code Refactoring ⚙ #416

Closed

Conversation

sanjaiyan-dev
Copy link
Contributor

This PR introduces minor improvements, such as:

  1. Adding the type="search" attribute to the input tag for better accessibility.
  2. Adding decoding properties in the img tag.
  3. Refactoring the code by adding event modifiers directly using '|'.

Extremely sorry if I made any mistakes :(

Copy link

@itsmatteomanf itsmatteomanf left a comment

Choose a reason for hiding this comment

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

I'd just revert the preventDefault I commented on.

pagefind_ui/default/svelte/ui.svelte Outdated Show resolved Hide resolved
pagefind_ui/default/svelte/ui.svelte Outdated Show resolved Hide resolved
Copy link

@itsmatteomanf itsmatteomanf left a comment

Choose a reason for hiding this comment

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

LGTM, but not sure if all these changes are correct. I'm gonna wait for a second approval.

pagefind_ui/default/svelte/ui.svelte Outdated Show resolved Hide resolved
@sanjaiyan-dev
Copy link
Contributor Author

🧐🫠

@bglw
Copy link
Contributor

bglw commented Oct 2, 2023

Sorry to leave you hanging! Had to deal with some tasks that were put aside while working on the 1.0 release. Coming back around to new PRs and issues in this repo soon.

@bglw
Copy link
Contributor

bglw commented Oct 13, 2023

Hi @sanjaiyan-dev — on Chrome (and others?) an input with type="search" shows a clear button in the input. Since the Pagefind UIs have their own implementations of this, it would be good to hide the browser default.

Let me know if this is a change you're keen to make or if you'd rather I tackle it 🙂 Everything else looks good!

Screenshot 2023-10-13 at 3 14 54 PM

@sanjaiyan-dev
Copy link
Contributor Author

Hi @sanjaiyan-dev — on Chrome (and others?) an input with type="search" shows a clear button in the input. Since the Pagefind UIs have their own implementations of this, it would be good to hide the browser default.

Let me know if this is a change you're keen to make or if you'd rather I tackle it 🙂 Everything else looks good!

Screenshot 2023-10-13 at 3 14 54 PM

@bglw
If you believe that adding the 'type=search' attribute may not be necessary, I would like to suggest considering the use of the 'inputmode' attribute as an alternative. You can find more information about it on the Mozilla Developer Network here: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/inputmode

@bglw
Copy link
Contributor

bglw commented Oct 14, 2023

I think the type search is good — we just need to normalize the styling. At a glance, https://stackoverflow.com/a/77190241 seems good, but will need to test it across browsers to make sure

@sanjaiyan-dev
Copy link
Contributor Author

I think the type search is good — we just need to normalize the styling. At a glance, https://stackoverflow.com/a/77190241 seems good, but will need to test it across browsers to make sure

🤝

@bglw bglw closed this Jun 26, 2024
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