RotherOSS / otobo

OTOBO is one of the most flexible web-based ticketing systems used for Customer Service, Help Desk, IT Service Management. https://otobo.io/
GNU General Public License v3.0
251 stars 72 forks source link

Tidy boolean HTML attributes #3583

Closed stefanhaerter closed 2 months ago

stefanhaerter commented 3 months ago

I found some leftovers of disabled="disabled". Is this supposed to be also changed to disabled or are there objections?

Originally posted by @stefanhaerter in https://github.com/RotherOSS/otobo/issues/2333#issuecomment-2178419121

bschmalhofer commented 3 months ago

No objection to tidying the disabled attributes. That attribute is specced as boolean, see https://html.spec.whatwg.org/multipage/indices.html#attributes-3 .

stefanhaerter commented 2 months ago

I found a list of boolean html attributes:

Edit: Confirmed via grep that the ticked attributes are not falsely used ( grep '[ATTRIBUTE]=' -Rl ./, e.g. grep 'defer=' -Rl ./ )

bschmalhofer commented 2 months ago

Fixed the HTML generated by BuildSelection(). The fix is in commits that were mistakenly linked to #3584 . After the fix the test suits looks fine again. There is also a bit of refactoring. Boolean attribute can, and should, now be indicated by the variables provided by Types::Serialiser.

stefanhaerter commented 2 months ago

Attributes tidied, closing the issue.