id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,focuses 39912,Image empty alt attributes get stripped out when editing the image details from a post,afercia,iseulde,"When an image has a decorative purpose, it's extremely important for accessibility that the image has an empty alt attribute `alt=""""`. In absence of an empty alt attribute, assistive technologies won't assume the image is just decorative and will try to read out ""something"". In most of the cases they read out the image file path or part of it, i.e. the filename. Turns out, when editing the details of an image inside a post, empty alt attributes get stripped out when updating the details. Seems to me this is not specific to 4.7 but happens also in some of the previous versions, under different conditions. Worth reminding the alt attribute fallback to the title was recently removed, and this is one of the reasons for the different behaviour across different versions. To reproduce in WordPress 4.7: - edit a post - insert an image with an empty alt attribute The markup inserted in the post will be something like this: `` - then click on the image and click on the ""Edit"" pencil icon in the inline image toolbar - the ""Image Details"" modal opens - change some image property, for example set the alignment to ""right"" - click the ""Update"" button in the modal The updated markup in the post will be: `` To reproduce in WordPress 4.6 and 4.5: - repeat all the steps above but make sure that also the ""Title"" of the image is empty. When both the title and the alt text fields are empty, the empty `alt=""""` gets stripped out WordPress 4.4: Seems to me the empty alt attribute is always preserved, which is the correct behaviour. ",defect (bug),closed,high,4.7.3,TinyMCE,,normal,fixed,has-patch fixed-major,,accessibility