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

Enable browser autocomplete on user's own address fields #13938

Conversation

gcamacho079
Copy link
Contributor

@gcamacho079 gcamacho079 commented Nov 16, 2023

Description

Enable autocomplete for most address fields for user’s own address (not other user addresses), the exception being selectize fields. (@brandonkelly would this be a good opportunity to un-selectize locale/address fields entirely, or save that for a later release?)

This PR — specifically the getInputPurpose method — will also help achieve WCAG 2.1 AA compliance in Console, as we can use it to set input purposes on the billing address fields.

Related issues

Resolves ACC-42

Copy link

linear bot commented Nov 16, 2023

CLD-121 Payment method address fields don't use appropriate autocomplete values

Page Area:

Billing - payment method modal

Issue Description:

Address inputs use user information, but don't use autocomplete values that would assist in user input. This includes:

  • Full name
  • Country
  • Address Line 1
  • Address Line 2
  • Postal Code
  • Province
  • City
  • And other regional address fields

Action:

Use autocomplete values specified in Input Purposes for User Interface Components

Screenshot/Code Snippet:

N/A

craftnet/controllers/console/AddressesController.php

@gcamacho079 gcamacho079 marked this pull request as ready for review December 1, 2023 23:15
Copy link

linear bot commented Dec 1, 2023

ACC-42 city

@brandonkelly
Copy link
Member

This PR — specifically the getInputPurpose method — will also help achieve WCAG 2.1 AA compliance in Console, as we can use it to set input purposes on the billing address fields.

Feels a little sketchy to be relying on that method on front ends. Couldn’t the Console UI be setting its own autocomplete values?

@gcamacho079
Copy link
Contributor Author

Feels a little sketchy to be relying on that method on front ends. Couldn’t the Console UI be setting its own autocomplete values?

I’ll need to refresh myself on why I went this route and see if that alternative makes more sense. Will get back to you on this shortly!

@gcamacho079
Copy link
Contributor Author

@brandonkelly moved that method to Cp and made the other methods private and static. What are your thoughts about un-selectizing the other fields (country, state, etc.) in the address forms?

@brandonkelly
Copy link
Member

I think we should keep Selectize there until we have a better alternative (like the disclosure menu with a search input + inline list, like we talked about). Until then, it does make working with very large selects a lot more manageable.

@gcamacho079
Copy link
Contributor Author

I think we should keep Selectize there until we have a better alternative (like the disclosure menu with a search input + inline list, like we talked about). Until then, it does make working with very large selects a lot more manageable.

Ok! I’ve been working on a mockup/wireframe for this in Figma, trying to think through the a11y UX; I’ll aim to have something concrete by Monday.

src/helpers/Cp.php Outdated Show resolved Hide resolved
Copy link

linear bot commented Dec 14, 2023

brandonkelly and others added 7 commits December 15, 2023 10:24
[ci skip]
@brandonkelly brandonkelly merged commit 0cc1e27 into develop Dec 15, 2023
@brandonkelly brandonkelly deleted the feature/cld-121-payment-method-address-fields-dont-use-appropriate branch December 15, 2023 19:21
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