yii-bootstrap5 icon indicating copy to clipboard operation
yii-bootstrap5 copied to clipboard

Incomplete and/or invalid BS5 components

Open WinterSilence opened this issue 3 years ago • 0 comments

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.

WinterSilence avatar Feb 20 '22 21:02 WinterSilence