HTML, CSS & accessibility
Layouts, forms, browser behavior and accessible interface troubleshooting.
112 troubleshooting guides · Page 1 / 5
Is decoded HTML safe to insert into a page as markup?
https://kitforma.com/en/html-unescape/ converts supported entity representations to characters; it does not make arbitrary input safe HTML.
How do I check that CSS minification did not change a layout?
Keep the source and process a copy in https://kitforma.com/en/css-minifier/.
Why does opening a filter panel submit the surrounding HTML form?
A button associated with a form defaults to submit behavior unless its type says otherwise.
Why is an input visible but absent from FormData?
Form submission uses control names, not IDs or labels.
Why does disabling an order field remove its value from the request?
Disabled controls are omitted from normal form submission and FormData construction.
Why does an unchecked checkbox disappear instead of submitting false?
Unchecked checkboxes do not contribute their name/value pair.
Why does checked="false" still check an HTML checkbox?
Boolean HTML attributes are true by presence.
Why does converting FormData to an object lose multiple selected values?
A multi-select can submit several entries with the same name.
Why does a number input lose leading zeros in a postal code?
A postal code is an identifier, not a quantity.
Why does an HTML date field display locally but submit YYYY-MM-DD?
The browser localizes the date control’s presentation while its value uses a normalized date string.
How do I stop shipping autofill from overwriting billing fields?
Give related groups distinct autocomplete section tokens, such as section-shipping shipping street-address and section-billing billing street-address.
Why does readonly not prevent editing a select element?
readonly applies to supported text-like controls, not select or checkbox controls.
Why does form.submit bypass required-field validation and my submit handler?
The submit method performs direct submission without the usual submit event and constraint-validation path.
Why does form.submit become a control instead of a function?
A form control named or identified as submit can shadow the form method.
Why does a nested form submit the wrong set of fields?
Nested forms are invalid HTML and the parser may reorganize or ignore the inner form boundary.
Why does clicking the second label focus the first repeated field?
Duplicate IDs can bind multiple labels to the same control.
How do I give a radio group an accessible shared question?
Place related radios inside a fieldset with a concise legend, then give each radio its own label.
Why does a placeholder-only form become hard to use after typing?
The hint disappears once a value is entered and does not replace a persistent label.
How do I name an icon-only close button without reading the icon twice?
Use a native button with an accessible name such as aria-label="Close preview" and hide a purely decorative icon from assistive technology.
Why does a link styled as a button behave incorrectly with Space and open-in-new-tab?
Choose semantics by action: navigation needs an anchor with a real href; an in-page action needs a button.
How do I build a disclosure that still works without JavaScript?
Use details with summary as its disclosure control, placing the expandable content after summary.
Why does adding open to a dialog not make the page behind it modal?
The open attribute alone displays a nonmodal dialog.
Why does a dialog reopen with focus on the wrong control?
Choose initial focus intentionally and apply autofocus to the appropriate dialog control where suitable.
Why does a popover close on an outside click but my custom dropdown does not?
An auto popover has browser-managed light-dismiss behavior; a manual popover requires explicit closing logic.
Ask your own question · Sign in to post questions and answers.