orchidsoftware / orchidsoftware/platform
Improve naming and separation of attributes for input fields
@tabuna is already working on this.
Since Sep 9, 2025.
- Dominant language
- PHP
- Stars
- 4.8k
- Forks
- 663
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 7
Description
Problem:
Currently, to set a label above an input field, the title method is used:
Input::make('name')
->title('Your name')
However, using title is not entirely correct, as in HTML the title attribute is intended to provide advisory information about the element, not for displaying the main label of the field.
Proposed solution:
Introduce a separate label method for the main field label, keeping title for advisory or helper text. This aligns with practices in Bootstrap, Windows Forms, and other popular UI frameworks:
Input::make('name')
->label('Your name') // Main label above the field
->title('Enter your name here') // Hint or advisory information
Benefits of this separation:
- Correct terminology and semantic meaning.
- Greater flexibility when building interfaces.
Backward compatibility:
To avoid breaking existing code, the title method can remain. If label is not set, its value can be automatically assigned from title. This will preserve the current behavior.
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.
Assessment
This issue has not been assessed yet.