aria-labelledby attribute for #textbox

15 views
Skip to first unread message

Anton Prokofiev

unread,
Mar 23, 2021, 12:40:38 PM3/23/21
to Nitrogen Project / The Nitrogen Web Framework for Erlang

Are there any plans to add aria-labelledby atribute to #textbox{}?

Material.io heavy use it ...:

===============================================
<label class="mdc-text-field mdc-text-field--filled">
  <span class="mdc-text-field__ripple"></span>
  <span class="mdc-floating-label" id="my-label-id">Hint text</span>
  <input class="mdc-text-field__input" type="text" aria-labelledby="my-label-id">
  <span class="mdc-line-ripple"></span>
</label>
=======================================================

Jesse Gumm

unread,
Mar 24, 2021, 3:14:31 PM3/24/21
to nitrogenweb
Hey Anton,

I think the proper move would be to treat the aria-* attributes similar to the data-* attributes, since they follow the same pattern.

What do you think about that?

Would then be something like: #textbox{aria=[{labelledby, 'my-label-id'}]}

How does that feel to you?

-Jesse

--
You received this message because you are subscribed to the Google Groups "Nitrogen Project / The Nitrogen Web Framework for Erlang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nitrogenweb...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nitrogenweb/35ddb99f-f232-4991-996f-7d2bf03209d9n%40googlegroups.com.


--
Jesse Gumm
Owner, Sigma Star Systems
414.940.4866 || sigma-star.com || @jessegumm

Anton Prokofiev

unread,
Mar 25, 2021, 3:04:11 AM3/25/21
to Nitrogen Project / The Nitrogen Web Framework for Erlang
Hello Jesse,

Thanks a lot this would be great!

I have checked  html code, I got to integrate...
It would be great  if you can also extend Nitrogen for following attributes:

1. required - (input, select, text area) (https://www.w3schools.com/TAGS/att_required.asp).


It what I just found.

Maybe it is simpler to add something like extended_addributes = [{key,val}, key2, {key3,val3}] that
will be mapped to <html_element class="..." key=val, key2, key3=val3> </html_element> ?
So we can include what-ever they invent new?  :)


As far as I understand  they needed mainly for CSS frameworks only.
Except required, that would  be great to have as native support with the function
wf:is_required, wf:set_requorired, wf:remove_required

or also have universal approach:
wf:is_attibute, wf:set_attribute, wf:delete_attribute?


Regards, Anton.
Reply all
Reply to author
Forward
0 new messages