orchidsoftware / orchidsoftware/platform

Improve naming and separation of attributes for input fields

Open
#3,038 0 comments 0 reactions 1 assignee View on GitHub

@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:

  1. Correct terminology and semantic meaning.
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.