[wp-trac] [WordPress Trac] #30421: Add ARIA attributes to globally permitted HTML attributes in kses

WordPress Trac noreply at wordpress.org
Sun Feb 22 14:12:20 UTC 2015


#30421: Add ARIA attributes to globally permitted HTML attributes in kses
-------------------------------------+-------------------------------------
 Reporter:  jwenerd                  |       Owner:
     Type:  enhancement              |      Status:  new
 Priority:  normal                   |   Milestone:  4.2
Component:  Formatting               |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  kses needs-patch needs-  |     Focuses:  accessibility,
  unit-tests                         |  administration
-------------------------------------+-------------------------------------

Comment (by mattheu):

 I'm not sure whe want to go too far down the path of trying to validate
 aria attributes and should probably allow aria-* attributes on all
 elements. The bigger complexity is that certain aria attributes are only
 supported for certain `role` attributes.

 I have uploaded a few patches.

 The first adds unit tests for all the allowed aria attributes. It
 currently fails.

 The second patch - I looked into adding all the aria attributes to global
 attributes. This works OK, but the list of attributes is a long one, and
 we would have to maintain this if anything changes. It is useful if we
 want to go further with this.

 The third patch is a bit simpler and just whitelists any attributes that
 start with `aria-`.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30421#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list