loadsys / loadsys/twitter-bootstrap-helper

Radio helper generates incorrect "for" attribute

Open
#16 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
168
Forks
52
PR merge metrics
No merged PRs in 30d

Description

First off, great plugin! Really saved me a lot of time on my latest project. Noticed a small bug when using the radio method.

The `$this->TwitterBootstrap->radio` method generates an incorrect "for" tag in the label.control-label tag.

The proper syntax for a bootstrap radio button label.control-label is different from the rest of the normal label.control-label tags:

for a radio button group it should look like this:
`Radio buttons`
for a non radio button group it should look something like this:
`Prepended text`

Notice the "for" attribute in the radio button group should be missing. As it stands, since there is no form control element for it to be bound to, it also fails HTML5 validation.

Contributor guide

No contributing guide indexed for this repository

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.

Research direction

Start with the TwitterBootstrap radio method described in the issue and inspect how it generates the label.control-label markup. Compare its output with the provided radio and non-radio examples; done means the radio label omits the for attribute while non-radio labels retain it, with HTML5-valid output.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.