Add alt text validation option to user preferences (supersedes #913) (#914)

* Add alt text validation option to user preferences

* Fix typos/linting issues

* Update accessibility setting to match styles

* Update the required alt text reminder to go away once it's added

---------

Co-authored-by: Emma Fuller <emma@emmafuller.dev>
This commit is contained in:
Paul Frazee 2023-07-03 15:58:07 -05:00 committed by GitHub
parent bc55241c9a
commit 696bffe832
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 3 deletions

View file

@ -23,6 +23,10 @@ export class GalleryModel {
return this.images.length
}
get needsAltText() {
return this.images.some(image => image.altText.trim() === '')
}
async add(image_: Omit<RNImage, 'size'>) {
if (this.size >= 4) {
return