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

Form field: announce error text when nested interactive is focussed #3746

Merged
merged 19 commits into from
Feb 7, 2025

Conversation

RasmusKjeldgaard
Copy link
Collaborator

@RasmusKjeldgaard RasmusKjeldgaard commented Dec 20, 2024

Which issue does this PR close?

This PR closes #3680

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Are there any additional context?

Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Reminders

  • Make sure you have implemented tests following the guidelines in: "The good: Test".
  • Make sure you have updated the cookbook with examples and showcases (for bug fixes, enhancements & new components).

Review

  • Determine if your changes are a fix, feature or breaking-change, and add the matching label to your PR. If it is tooling, dependency updates or similar, add ignore-for-release.
  • Do a self-review.
  • Request that the changes are code-reviewed
  • Request that the changes are UX reviewed (only necessary if your PR introduces visual changes)

When the pull request has been approved it will be merged to develop by Team Kirby.

@github-actions github-actions bot temporarily deployed to pr-3680-error-message-not-announced January 6, 2025 14:44 Inactive
@github-actions github-actions bot temporarily deployed to pr-3680-error-message-not-announced January 12, 2025 20:10 Inactive
Comment on lines -156 to -158
// TODO: remove "!this.inputElement.readOnly" when ionic has fixed input click issue
// https://github.com/ionic-team/ionic-framework/issues/22740
Copy link
Collaborator Author

@RasmusKjeldgaard RasmusKjeldgaard Jan 16, 2025

Choose a reason for hiding this comment

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

Checking for the readOnly property complicates the logic a bit as the nestedInteractiveElement can now also be a radio-group that does not have that property.

The linked issue is fixed by Ionic, so instead I tried to be a good scout and removed the logic.

I tested on a device, and inputs with readOnly cannot be focussed, while inputs without can be focussed with a single click as expected.

@github-actions github-actions bot temporarily deployed to pr-3680-error-message-not-announced January 16, 2025 15:07 Inactive
@RasmusKjeldgaard RasmusKjeldgaard changed the title Bug/3680 error message not announced Form field: announce message and error text when nested interactive is focussed Jan 16, 2025
@RasmusKjeldgaard RasmusKjeldgaard changed the title Form field: announce message and error text when nested interactive is focussed Form field: announce error text when nested interactive is focussed Jan 16, 2025
@RasmusKjeldgaard RasmusKjeldgaard marked this pull request as ready for review January 16, 2025 15:35
@github-actions github-actions bot temporarily deployed to pr-3680-error-message-not-announced January 16, 2025 15:39 Inactive
@github-actions github-actions bot temporarily deployed to pr-3680-error-message-not-announced January 31, 2025 08:10 Inactive
@RasmusKjeldgaard RasmusKjeldgaard added the feature Add this PR to the changelog as a feature label Jan 31, 2025
@github-actions github-actions bot temporarily deployed to pr-3680-error-message-not-announced January 31, 2025 12:43 Inactive
@github-actions github-actions bot temporarily deployed to pr-3680-error-message-not-announced February 2, 2025 13:42 Inactive
Fuzzy3
Fuzzy3 previously approved these changes Feb 5, 2025
Copy link
Collaborator

@Fuzzy3 Fuzzy3 left a comment

Choose a reason for hiding this comment

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

Really nice job ! Just a single suggestion to make a base class for the formfieldcontrol. However i'm approving since that might be out of scope

@@ -0,0 +1,6 @@
import { EventEmitter } from '@angular/core';

export interface FormFieldControl {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I ❤️ this

Copy link
Collaborator

Choose a reason for hiding this comment

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

Now that I'm looking at the hasError logic, I noticed its all the same lines of code. Maybe we should have a base FormFieldControl that all the other components extend?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good idea, would prefer if we add it in another PR for just that 🚀

@RasmusKjeldgaard RasmusKjeldgaard merged commit 34944bf into develop Feb 7, 2025
12 checks passed
@RasmusKjeldgaard RasmusKjeldgaard deleted the bug/3680-error-message-not-announced branch February 7, 2025 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Add this PR to the changelog as a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Form Field: The error messages below a form-field is never read from a screen reader
2 participants