Dialog > buttons option 'text' should be 'label' instead ?
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.3k
- Forks
- 5.2k
- PR merge metrics
- No merged PRs in 30d
Description
When we are setting the buttons for a dialog, the option to set the button text is 'text': https://api.jqueryui.com/dialog/#option-buttons
But on the Button Widget the option is called 'label'. https://api.jqueryui.com/button/#option-label
To make it consistent between the two places, shouldn't the option for the dialog be also called label?
Looking at the code for dialog.js it seems the dialog never sets buttonOptions.label thus making it impossible to use the right option on the dialog.
I understand this breaks compatibility but it's pretty easy to keep retrocompatibility and offer the label option on dialog. It also makes it easier to understand the dialog docs if we support all the button options over there. (most are supported but not all)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading dialog.js and comparing the dialog buttons option with the Button Widget’s label option in the linked API documentation. Check how existing dialog button options are handled and whether the documentation lists them consistently. Done means label is supported without unnecessarily breaking text compatibility, with the dialog documentation updated to match.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, jquery
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100