7/8/2023 0 Comments Autosize js![]() Does it actually read the same as an input in a screen reader?.What about the idea that form data is often serialized and sent along, while the code that’s doing it probably isn’t looking for a span?.What about the fact that forms can be submitted with the Enter key?.That’s just a best-guess based on some docs. Notice I put role="textbox" on the element. If it was a or any other element that is block-level, it would also expand vertically as needed. That will naturally grow to be the width it needs to be for the content it contains. We can make any element editable and input-like with the contenteditable attribute: It’s weird to me that there is no way to force an input element to mimic this behavior, but alas. I was thinking about this after Remy Sharp blogged about it recently in the context of inline elements. But of course, there are ways, my friend. Kinda funny, as that seems like a reasonable use-case. ![]() In fact, there isn’t any simple HTML or CSS way to make them do that. By default, and elements don’t change size based on the content they contain.
0 Comments
Leave a Reply. |