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

Feature: add ability to provide input label #2078

Merged
merged 2 commits into from
Oct 11, 2020
Merged

Feature: add ability to provide input label #2078

merged 2 commits into from
Oct 11, 2020

Conversation

krosenk729
Copy link
Contributor

allows someone to provide inputLabel which will create a element linked to the input (this is a significant improvement to accessibility)

  Swal.fire({
    input: 'text',
    inputLabel: 'Lorem Ipusum'
  })

image

Copy link
Member

@limonte limonte left a comment

Choose a reason for hiding this comment

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

AMAZING AMAZING AMAZING contribution, thank you @krosenk729!

Please make some changes according to the review.

src/scss/_core.scss Outdated Show resolved Hide resolved
src/scss/_core.scss Outdated Show resolved Hide resolved
src/scss/_core.scss Outdated Show resolved Hide resolved
src/scss/_core.scss Outdated Show resolved Hide resolved
src/staticMethods/dom.js Outdated Show resolved Hide resolved
src/utils/dom/getters.js Outdated Show resolved Hide resolved
src/variables.scss Outdated Show resolved Hide resolved
src/variables.scss Outdated Show resolved Hide resolved
src/variables.scss Outdated Show resolved Hide resolved
@krosenk729
Copy link
Contributor Author

thanks for the fast review @limonte - everything should be updated

Copy link
Member

@limonte limonte left a comment

Choose a reason for hiding this comment

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

Thanks a lot @krosenk729

This feature will definitely improve the plugin's a11y!

Will be released in 1 hour or so.

@limonte limonte merged commit a437376 into sweetalert2:master Oct 11, 2020
limonte pushed a commit that referenced this pull request Oct 11, 2020
# [10.4.0](v10.3.7...v10.4.0) (2020-10-11)

### Features

* add `inputLabel` parameter ([#2078](#2078)) ([a437376](a437376))
@limonte
Copy link
Member

limonte commented Oct 11, 2020

🎉 This PR is included in version 10.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

matvejs16 pushed a commit to matvejs16/sweetalert2-fix that referenced this pull request Mar 29, 2023
* adding ability to add 'label' element to inputs

* updating label to 'input-label'
matvejs16 pushed a commit to matvejs16/sweetalert2-fix that referenced this pull request Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants