silverstripe / cwp

Common Web Platform (CWP) features module. We strongly recommend using it for all new CWP projects. Future features will be delivered here.
https://www.cwp.govt.nz
BSD 3-Clause "New" or "Revised" License
10 stars 26 forks source link

Reintroduce feature to validate that CMS users have entered alt tags for images #149

Closed robbieaverill closed 4 years ago

robbieaverill commented 6 years ago

See https://github.com/silverstripe/cwp-core/pull/46

The cwp/cwp-core module has some logic which (in theory) is validating that an image added in the CMS has been given and alt tag (for accessibility).

In the context of CWP 2.x this doesn't work because the code hasn't been correctly upgraded from CWP 1.x and isn't actually being run in CWP 2.x at the moment because it's excluded by an incorrect config class namespace and the update hook it's using doesn't exist in core any more.

The feature still seems useful, so we should reintroduce it in this module rather than cwp/cwp-core which is designed for platform CWP support.

The old javascript does the following:

Side note: I'm raising this as a new feature rather than a bug because it hasn't existed in CWP 2.x at all yet.

robbieaverill commented 5 years ago

Re-triaged as a bug since it's missing functionality. This is duplicated by https://github.com/silverstripe/cwp-core/issues/55, which was also triaged as a high impact bug.

brynwhyman commented 5 years ago

There's talk of putting validation in the asset-admin module directly https://github.com/silverstripe/silverstripe-asset-admin/issues/840

brynwhyman commented 4 years ago

With the introduction of the enhancements made in https://github.com/silverstripe/silverstripe-asset-admin/issues/983 I'm going to close this issue.

The recent changes don't include validation that alt-text has always been entered, but I think that's appropriate. Alt text shouldn't always be required, so the focus should be on giving the Content Manager enough information to make an informed decision. The above issue does that.