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

[Identity][Templates] Ensure placeholders don't overlap with text #57783

Merged
merged 5 commits into from
Sep 12, 2024

Conversation

javiercn
Copy link
Member

Fixes https://github.com/dotnet/AspNetCore-ManualTests/issues/3081

There are several breakpoints where the placeholder interferes with the label. The issue here is that the label support in Bootstrap relies on a float element, which is less than ideal, as we can't compute its size to take it into account.

The fix here is to ensure that all input elements have enough space to render across the different breaking points and that placeholders are short enough to avoid overlapping with the floating labels.

In a future version we should change the display of our forms to avoid this floating label approach.

AccessibilityFix.mp4

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates label Sep 10, 2024
@javiercn
Copy link
Member Author

/backport to release/9.0

Copy link
Contributor

Started backporting to release/9.0: https://github.com/dotnet/aspnetcore/actions/runs/10799418168

@javiercn javiercn merged commit bb3b2e9 into main Sep 12, 2024
27 checks passed
@javiercn javiercn deleted the javiercn/templates-placeholder-fix branch September 12, 2024 20:04
@dotnet-policy-service dotnet-policy-service bot added this to the 10.0-preview1 milestone Sep 12, 2024
mkArtakMSFT pushed a commit that referenced this pull request Sep 13, 2024
… with text (#57789)

Backport of #57783 to release/9.0

/cc @javiercn

# [Identity][Templates] Ensure placeholders don't overlap with text

Placeholder text on input textboxes overlaps with the label texts.

## Description

* As part of an accessibility fix, we started displaying placeholders on input elements.
* In some circumstances, these placeholders overlap with the labels on the input text boxes, making it problematic to read them.
* The fix addresses this by reducing the size of the placeholders and making inputs bigger to avoid any overlap.

Fixes https://github.com/dotnet/AspNetCore-ManualTests/issues/3081

## Customer Impact

When the window size is small enough, customers could see overlapped text that's hard to read and is sometimes even impossible.

## Regression?

- [X] Yes
- [ ] No

8.0 since we introduced this behavior on 9.0 as part of accessibility fixes.

## Risk

- [ ] High
- [ ] Medium
- [x] Low

The attached videos serve as validation of the fix, in addition to that, the UI is completely customizable by customers.

## Verification

- [X] Manual (required)
- [ ] Automated

**Old behavior**
![image](https://github.com/user-attachments/assets/ae72b769-7215-4b0a-954b-a59fb84fbb7d)

![image](https://github.com/user-attachments/assets/f9e32542-7aa7-47ba-876e-567435ef4bdc)

**New behavior**

https://github.com/user-attachments/assets/6eae3396-9794-402d-af65-e0bc89257a44

https://github.com/user-attachments/assets/0343b4fc-5f55-4e46-a276-67c4c97645e2

## Packaging changes reviewed?

- [ ] Yes
- [ ] No
- [X] N/A

----

## When servicing release/2.1

- [ ] Make necessary changes in eng/PatchConfig.props
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-mvc Includes: MVC, Actions and Controllers, Localization, CORS, most templates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants