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

Add [alt] attributes to images #9644

Conversation

Souvik-Cyclic
Copy link
Contributor

Closes #9629

Adds [alt] attributes to images for Improving Accessibility Score of Book Pages

Stakeholders

@cdrini

Comment on lines 35 to 39
<span class="nav-arrow">
<img src="/static/images/nav-arrow.svg" role="img">
<button title="$_('Go to next section')">
<img src="/static/images/nav-arrow.svg" alt="">
</button>
</span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Heads up: This was meant to replace the span with the button, and you'll have to update some the CSS as well

Copy link
Contributor Author

@Souvik-Cyclic Souvik-Cyclic Jul 31, 2024

Choose a reason for hiding this comment

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

I have replaced the span with button, so sorry I'm not much experienced with CSS, so wasn't able to style the button as it was before. Once this PR is merged, I will open an issue to restore the button styling to its previous state. @cdrini @jimchamp

@Souvik-Cyclic Souvik-Cyclic force-pushed the 9629/detailing/img-alt-addon branch from 0c5185f to 6f8416a Compare July 31, 2024 17:39
Copy link
Collaborator

@jimchamp jimchamp left a comment

Choose a reason for hiding this comment

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

Thanks for your patience, @Souvik-Cyclic!

This is mostly good. The styling of the Go to next section button will need to be updated before this can be merged in.

openlibrary/macros/EditionNavBar.html Outdated Show resolved Hide resolved
@jimchamp jimchamp added the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Aug 14, 2024
Co-authored-by: jimchamp <28732543+jimchamp@users.noreply.github.com>
@github-actions github-actions bot removed the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Aug 16, 2024
benbdeitch and others added 18 commits August 17, 2024 03:00
* Hide download options when book is unavailable.
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.5.4 → v0.5.5](astral-sh/ruff-pre-commit@v0.5.4...v0.5.5)
- [github.com/pre-commit/mirrors-eslint: v9.7.0 → v9.8.0](pre-commit/mirrors-eslint@v9.7.0...v9.8.0)
The Slack channel string begins with a `#` character.  Quoting this
string prevents the channel from being parsed as comment on script
execution.
…rchive#9626)

* Altered BulkSearch to handle abstractors in their own class, rather than as a part of the vue component.

* Adjusted samplebar selector to directly load based off of the 'extractors' array.
…archive#9687)

* update description of alternate names on author edit page
This commit stops non-DirectProvider web books from being matched as
`DirectProvider`s.

The `Storage` objects that ultimately come from `SearchResponse` have
`Acquisition` objects in their `providers` fields, so every web book
search result will have a `providers` attribute.

This commit limits the matching for `DirectProvider` to cases where the
`Acquisition` object has a value other than `None`, which is the default
initialization value for `Acquisition.provider_name`.

More exploration will be needed to see whether a similar mis-match
problem occurs when there is more than one `Acquisition` per `Work`.
The `direct_read_button.html` needs a unique `data-toast-trigger` per
domain, otherwise every `DirectProvider` book, when multiple are
displayed from different providers, will have trigger the same class id.
renovate bot and others added 18 commits August 17, 2024 03:00
When an import record is "incomplete" per internetarchive#9440, this commit will look
to the `import_item` table to supplement that `rec` with data loaded by
BookWorm.

This attempt to supplement will apply to any import source if one of the
required-for-completeness fields (title, authors, publish_date) is
missing.

See internetarchive#9440.
This commit changes `promise_batch_imports.py` so that it no longer adds
variations of `????` in place of the following empty fields:
- `authors`
- `publish_date`
- `title`

These fields are once again required for all imports, including promise
items. `????` will also no longer be removed from these fields when
importing.

When one of these fields is missing, a request is made to BookWorm to
stage the item for import, if metadata can be found. A companion commit
changes the import process so if one of the above required fields is
missing, it will look to the `import_table` for `pending` or `staged`
metadata.

See internetarchive#9440.
This commit updates the `statsd` wrapper to add support for the `gauge`
data type, and makes use of it to add a `gauge` to promise item imports
so that we can know, per batch, the complete/incomplete rate.
This commit changes the import requirements such that a record must
either be:
1. complete, or
2. differentiable.

See internetarchive#9440 for the
definitions.
Co-authored-by: Scott Barnes <scottreidbarnes@gmail.com>
@Souvik-Cyclic
Copy link
Contributor Author

I fixed the indentation, but I had trouble adjusting the button's styling. I tried changing the CSS, but the changes didn't take effect. @jimchamp, could you help me with this?

@Souvik-Cyclic Souvik-Cyclic requested a review from jimchamp August 16, 2024 21:33
@jimchamp
Copy link
Collaborator

Sure! Every time a change is made to a .less file, the change needs to be compiled into CSS before it can take effect. You can do this by running the following:

docker compose exec web make css

More information about developing Open Library's front-end can be found here.

@jimchamp jimchamp added the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Aug 16, 2024
@github-actions github-actions bot removed the Needs: Submitter Input Waiting on input from the creator of the issue/pr [managed] label Aug 17, 2024
@codecov-commenter
Copy link

codecov-commenter commented Aug 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.70%. Comparing base (ce16a79) to head (37e07d2).
Report is 209 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9644      +/-   ##
==========================================
+ Coverage   16.06%   16.70%   +0.64%     
==========================================
  Files          90       90              
  Lines        4769     4824      +55     
  Branches      832      841       +9     
==========================================
+ Hits          766      806      +40     
- Misses       3480     3494      +14     
- Partials      523      524       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Souvik-Cyclic
Copy link
Contributor Author

Souvik-Cyclic commented Aug 17, 2024

I am closing this PR due to an error on my part. I will submit a new one shortly.

New PR #9761

@Souvik-Cyclic Souvik-Cyclic deleted the 9629/detailing/img-alt-addon branch August 17, 2024 09:51
@Souvik-Cyclic
Copy link
Contributor Author

Souvik-Cyclic commented Aug 17, 2024

@jimchamp What exactly happened that so many commits started showing in this one ?

New PR #9761

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.

Image elements do not have [alt] attributes