Page MenuHomePhabricator

Text elements must have sufficient color contrast against the background and Form <input> elements must have labels
Open, Needs TriagePublicBUG REPORT

Description

Steps to Reproduce

  • Make sure you have the msupload extension installed and activated.
  • Download the Accessibility insights for web extension
  • Navigate to the edit source page.
  • Click on the Accessibility insights tool icon, you can find the icon beside the navigation bar
  • Click Fastpass

Fixed:

  • Color contrast
  • Form labels

Event Timeline

accessiblity ms upload.PNG (138×1 px, 9 KB)

@Samwilson The element associated with background #657d91 and its containing elements should be high contrast. Along with this, the upload button generates <input id="blah" type="file" style="font-size: 999px; opacity: 0; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%;" multiple="" accept="" tabindex="-1">, this underlying markup must have some label associated with it in order to help screen readers decipher the underlying content. The two problem areas are indicated below. Also i'd highly recommend using the accessibility tool(it's supported by the new edge browser and google chrome, i don't know about firefox), it goes a long way in identifying the accessibility bottlenecks.

I've had a go at fixing the colours for the drop zone and bottom buttons:

msupload-new.png (130×926 px, 9 KB)

This isn't a very good fix: it just changes the colours. A more thorough change would probably be to use existing OOUI functionality where possible. The whole MsUpload UI needs a bit of an overhaul, I think!

(Assigning to me; or did you mean to indicate that you're working on it?)

@Samwilson apologies for the late reply, thank you for applying the fix mentioned above. I'd like to point out the fact that i'll contribute the other fix associated with label of the select file icon mentioned above as we don't have the bandwidth for an overhaul currently(long term fix) because we're fixing a bunch of community extensions with accessibility issues at the moment. Once again, i really appreciate your response. Thanks.

@Samwilson Why not orient on OOUI's SelectFileWidget?

We've prepared it to be conforming to color contrast requirements and it's building on top of DSG color palette.

@Volker_E I tried to do that in the above patch (but didn't check it very thoroughly; I've updated it a bit today).

One issue is that the background hover colour (when dropping files) #eaf3ff/@wmui-color-accent90 is not available in mediawiki.ui/variables.less, so I used @backgroundColorSuccess instead.

Another issue is that the default SelectFileWidget has a white background, but that looks weird when sitting right up against the top of the edit box (because it's also then the background for the row of action links that appears when files are being uploaded).

Certainly, a better fix would be to actually create a OOUI widget for MsUpload, but that's a bigger job. I figured we could just switch to some better colours quite easily.

@Samwilson No, I've got no time to work on this. Was just coming from the merged task to this and saw the screenshot from you above. We've already answered that user-interface question in OOUI, so I wanted to point out that there's good inspiration out there.

Oh right, yeah I didn't think you meant you'd do it. :-) It's a good idea to match the existing design! I'll do my best...

Change 564860 merged by jenkins-bot:
[mediawiki/extensions/MsUpload@master] Use defined colours for upload and button areas

https://gerrit.wikimedia.org/r/564860

@Akinwale-microsoft can you try the latest version and see if the colour changes are sufficient?

@Samwilson Thank you for the fix, I have validated the changes in our private wiki and the colors now have enough contrast.

Great!

Unfortunately, the above patch introduced incompatibility with MediaWiki 1.32, because it uses LESS variables that have been renamed since then. I'll make a follow-up patch to fix this.

Change 593089 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[mediawiki/extensions/MsUpload@master] Manually define background colors for backwards-compatibility

https://gerrit.wikimedia.org/r/593089

Anyone got a moment to look at the above patch?

Change 593089 merged by jenkins-bot:
[mediawiki/extensions/MsUpload@master] Manually define background colors for backwards-compatibility

https://gerrit.wikimedia.org/r/593089

@Samwilson: Hi, all related patches in Gerrit have been merged. Can this task be resolved (via Add Action...Change Status in the dropdown menu), or is there more to do in this task? Asking as you are set as task assignee. Thanks in advance!

Nope, the labels still need to be fixed up (see checkboxes in description). I'll try to get to it at some point, but will un-assign myself for now.