Radix is adding role="form" on all forms.

I'm not very knowledgeable about accessibility, but my understanding is that role="form" is to tell assistive technologies to treat some arbitrary tag as if it were a <form> tag -- if the tag already is a <form> tag then there is no reason to add the role="form".

So, I think we should remove that!

CommentFileSizeAuthor
#2 radix-role-form-2904751-2.patch492 bytesdsnopek

Comments

dsnopek created an issue. See original summary.

dsnopek’s picture

Status: Active » Needs review
StatusFileSize
new492 bytes

A patch for review! I'm going to point some more knowledgeable accessibility folks at this issue :-)

dsnopek’s picture

Issue tags: +Accessibility
mgifford’s picture

Makes sense to me.

cboyden’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me. According to the W3C's Using ARIA reference and also their HTML reference, redundant ARIA roles are unnecessary and not recommended.

  • arshadcn committed 19f6c6c on 7.x-3.x authored by dsnopek
    Issue #2904751 by dsnopek, mgifford, cboyden: role="form" redundant on...

arshadcn credited arshadcn.

shadcn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks everyone.

shadcn’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.