Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[7274] images: add validator which enforces alt texts on img tags #1520

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

goapunk
Copy link
Contributor

@goapunk goapunk commented Jan 29, 2024

Adds an alt text validator to project information and result forms in dashboard. Submitting the ckeditor form should fail if no alt text was set on an image

partly fixes liqd/a4-meinberlin#5394

Tasks

  • PR name contains story or task reference
  • Documentation (docs and inline)
  • Tests (including n+1 and django_assert_num_queries where applicable)
  • Changelog

@goapunk goapunk force-pushed the jd-2024-01-image-validator branch from 65d30ce to e5988fa Compare January 29, 2024 13:29
@goapunk goapunk changed the title images: add validator which enforces alt texts on img tags [7274] images: add validator which enforces alt texts on img tags Jan 29, 2024
@goapunk goapunk force-pushed the jd-2024-01-image-validator branch from e5988fa to a601a2a Compare January 29, 2024 13:32
Copy link

github-actions bot commented Jan 29, 2024

Coverage report

Total coverage

Status Category Percentage Covered / Total
🔴 Statements 12.85% 141/1097
🔴 Branches 14.86% 103/693
🔴 Functions 12.54% 44/351
🔴 Lines 20.55% 725/3528

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Report generated by 🧪jest coverage report action from b1e165b

@goapunk goapunk requested review from m4ra and hom3mad3 January 29, 2024 13:34
@goapunk goapunk force-pushed the jd-2024-01-image-validator branch 2 times, most recently from 934b7e8 to d52847e Compare January 29, 2024 13:38
verbose_name="Results of your project",
),
),
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's squash this and the last migration once this PR is merged to main.

@goapunk goapunk force-pushed the jd-2024-01-image-validator branch from d52847e to 2d7204d Compare January 29, 2024 16:48
@goapunk goapunk requested a review from m4ra January 29, 2024 16:49
@goapunk goapunk changed the title [7274] images: add validator which enforces alt texts on img tags WIP: [7274] images: add validator which enforces alt texts on img tags Jan 29, 2024
@goapunk goapunk force-pushed the jd-2024-01-image-validator branch from 2d7204d to b1e165b Compare January 29, 2024 17:01
@goapunk goapunk changed the title WIP: [7274] images: add validator which enforces alt texts on img tags [7274] images: add validator which enforces alt texts on img tags Jan 29, 2024
Copy link
Contributor

@m4ra m4ra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@m4ra m4ra merged commit 1120212 into main Jan 30, 2024
3 checks passed
@m4ra m4ra deleted the jd-2024-01-image-validator branch January 30, 2024 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#7274 [mB] replace ck editor - If uploading image, alt-text and copyright-infos are not mandatory
2 participants