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

feat(toggle): add required prop #30156

Open
wants to merge 9 commits into
base: feature-8.5
Choose a base branch
from

Conversation

OS-giulianasilva
Copy link
Contributor

@OS-giulianasilva OS-giulianasilva commented Jan 24, 2025

Issue number: resolves internal


What is the current behavior?

  • Currently, the screen reader do not announce the component as required when required={true}.

What is the new behavior?

  • Added a new required prop to be used for accessibility purposes that adds the required attribute to toggle's inner native input.

Does this introduce a breaking change?

  • Yes
  • No

@OS-giulianasilva OS-giulianasilva requested a review from a team as a code owner January 24, 2025 12:28
@OS-giulianasilva OS-giulianasilva requested a review from gnbm January 24, 2025 12:28
@github-actions github-actions bot added package: core @ionic/core package package: angular @ionic/angular package package: vue @ionic/vue package labels Jan 24, 2025
Copy link

vercel bot commented Jan 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 30, 2025 9:56am

@OS-giulianasilva OS-giulianasilva changed the base branch from main to feature-8.5 January 24, 2025 18:08
@@ -290,7 +297,8 @@ export class Toggle implements ComponentInterface {
}

render() {
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment } = this;
const { activated, color, checked, disabled, el, justify, labelPlacement, inputId, name, alignment, required } =
this;
Copy link
Contributor

@gnbm gnbm Feb 2, 2025

Choose a reason for hiding this comment

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

@OS-giulianasilva Any reason why we have this extra line-break before this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: angular @ionic/angular package package: core @ionic/core package package: vue @ionic/vue package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants