-
-
Notifications
You must be signed in to change notification settings - Fork 77
long image descriptions #1247
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
base: PG-2.20
Are you sure you want to change the base?
long image descriptions #1247
Conversation
acb109c
to
a80c823
Compare
OK, I think this can be looked at. We sorted out known issues. Possible things to change are cosmetic, or something overlooked with accessibility. |
af2c4bc
to
ea4af6c
Compare
If the
still shows the "image description", but with If the size is dropped. the image doesn't show anymore. |
macros/core/PGML.pl
Outdated
my $width = $item->{width} || ''; | ||
my $height = $item->{height} || ''; | ||
my $image_options = $item->{image_options} || {}; | ||
my $long_description = $item->{long_description} || {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be:
my $long_description = $item->{long_description} || '';
ea4af6c
to
6399330
Compare
Something needs to be done about inline images still. I suggest adding .image-container {
display: inline-block;
} to Here is a minimal example of a problem that renders differently with the current PG-2.20 branch (or before) and this pull request: DOCUMENT();
loadMacros('PGstandard.pl', 'PGML.pl');
BEGIN_PGML
[!webwork logo!]{'webwork_logo.png'}{320}
[!default icon!]{'defaulticon.png'}{100}
END_PGML
ENDDOCUMENT(); |
Also, I noticed that you didn't add the description for the answer graphs for the graphtool. Are you going to add that, or leave that for another pull request? |
ee0410f
to
8c70739
Compare
Now this reveals the details in a fixed position, centered at the bottom of the page. There is a button that can be used to dismiss the details (in addition to the summary button). When you open a second details, it dismisses the first one, so you can't have two open at the same time. I set it up to pass the details element to graphTool as |
8c70739
to
aa7c5b1
Compare
The z-index on the details content is now 10. And the POD for using |
aa7c5b1
to
be67682
Compare
be67682
to
d9a487c
Compare
Looks good to me, though I think @drgrice1 might still need to add this to the GraphTool answer graphs if used. |
This lets you pass to an image call a longer description of an image (longer than typical alt text). Typically this would only contain paragraphs and perhaps a table, and it would describe the image content in depth.
For HTML, this makes a details/summary element.
For PTX, this puts the longer description into a
description
child of theimage
. It also fixes an issue where the alt text was being put into adescription
element, but should go into ashortdescription
element.Here is a problem file to load and play with. The same image is inserted multiple times in different ways.