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

BootstrapFormHelper:connectFormControlWithLabel improvement #18

Closed
NikovacsDev opened this issue Jun 18, 2024 · 1 comment
Closed

BootstrapFormHelper:connectFormControlWithLabel improvement #18

NikovacsDev opened this issue Jun 18, 2024 · 1 comment
Assignees

Comments

@NikovacsDev
Copy link

The current method uses setAriaLabeledBy:

public static void connectFormControlWithLabel (@Nullable final IHCElement <?> aCtrl, @Nullable final HCFormLabel aLabel) {
    if (aCtrl != null && aLabel != null)
    {

      // Set "for" in label
      aLabel.setFor (aCtrl);

      // Set "aria-labelledby"
      aCtrl.customAttrs ().setAriaLabeledBy (aLabel);
    } } 

Wouldn't it be better if instead it uses the method addAriaLabeledBy? The difference would be that you could add ids before the connectFormControlWithLabel is called, at the moment that is not possible because the set overwrites the previously added ids.

@phax phax self-assigned this Jun 18, 2024
phax added a commit that referenced this issue Jun 18, 2024
@phax
Copy link
Owner

phax commented Jun 18, 2024

Thanks. Fixed. Will be part of the netx 9.2.5 release

@phax phax closed this as completed Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants