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

Email address inputs should use type="email" #128

Open
craigbrown opened this issue Jun 15, 2022 · 1 comment
Open

Email address inputs should use type="email" #128

craigbrown opened this issue Jun 15, 2022 · 1 comment

Comments

@craigbrown
Copy link

In the TrustFrameworkBase.xml files, several ClaimType items which are specifically used for email addresses are marked as being TextBox types.
For example:

<ClaimType Id="signInNames.emailAddress">
  <DisplayName>Email Address</DisplayName>
  <DataType>string</DataType>
  <UserHelpText>Email address to use for signing in.</UserHelpText>
  <UserInputType>TextBox</UserInputType>
</ClaimType>

Using this claim type results in an input tag with type="text" on the sign-in page.

I believe the UserInputType for the relevant ClaimType elements (signInNames.emailAddress, email, and possibly signInName) should be changed to EmailBox instead, which will result in an input with type="email".

Apart from being more semantically accurate, this will mean mobile devices treat the email input appropriately - e.g. not auto-capitalizing the first character of the email address and not trying to auto-complete.

For browsers that don't support type="email", they will fall back to treating the input as type="text".

@pedrodeniro
Copy link

I've just come across this myself. Spent quite a lot of time trying to understand why the email claim input was not behaving as expected (compared to the standard user flows which are using EmailBox).

Some of our less technical minded users have been struggling with the sign up page as a result, I would just like to add some weight to this issue, it should be corrected in the TrustFrameworkBase.xml to be <UserInputType>EmailBox</UserInputType>.

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

No branches or pull requests

2 participants