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

Incomplete and/or invalid BS5 components #79

Open
WinterSilence opened this issue Feb 20, 2022 · 0 comments
Open

Incomplete and/or invalid BS5 components #79

WinterSilence opened this issue Feb 20, 2022 · 0 comments

Comments

@WinterSilence
Copy link

Same problem as in package yii2-bootstrap5, that's widgets generates not complete or invalid BS5 components.
For example, simplest component in BS5 - buttons, widget Button not implements:

  • <a>s don’t support the disabled attribute, so you must add the .disabled class to make it visually appear disabled
  • Disabled buttons using <a> should include the aria-disabled="true" attribute to indicate the state of the element to assistive technologies
  • Disabled buttons using <a> should not include the href attribute
  • <a> should be given a role="button" to appropriately convey their purpose to assistive technologies

basic HTML generator's features:

  • auto escape content (escape only if not contains < and >)
  • normalize attribute values (boolean attributes set as "" or "attribute" too)

too not implemented...

What's doing widget? Add class btn and and generate tag i.e.

echo Button::widget()->label('Action')->options(['class' => 'btn-lg']);

generates

<button class="btn btn-lg">Action</button>

HTML tag less than PHP code!
This shows that dummy-widgets like as Button are useless to generates BS5 components.

@arogachev arogachev changed the title Uncomplete and/or invalid BS5 components Incomplete and/or invalid BS5 components Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant