Skip to content

Commit

Permalink
Minor accessibility fix with image alt text, replace img with dvg ver…
Browse files Browse the repository at this point in the history
…sion as preferred by ORCID, and update version number
  • Loading branch information
wfyson committed Apr 11, 2022
1 parent 1eebadc commit b349687
Show file tree
Hide file tree
Showing 6 changed files with 668 additions and 460 deletions.
2 changes: 1 addition & 1 deletion cfg/cfg.d/z_orcid_support.pl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ sub run_people_with_orcids
"href" => "https://orcid.org/$1",
"target" => "_blank",
);
$orcid_link->appendChild( $session->make_element( "img", "src" => "/images/orcid_16x16.png", "alt" => "ORCID logo" ) );
$orcid_link->appendChild( $session->make_element( "img", "src" => "/images/orcid_id.svg", "class" => "orcid-icon", "alt" => "ORCID logo" ) );

my $orcid_span = $session->make_element( "span", "class" => "orcid-tooltip" );

Expand Down
2 changes: 1 addition & 1 deletion lib/plugins/EPrints/MetaField/Orcid.pm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ sub render_single_value
my $url = "https://orcid.org/$value";

my $link = $session->render_link( $url, "_blank" );
$link->appendChild( $session->make_element( "img", src => "/images/orcid_16x16.png", class => "orcid-icon" ) );
$link->appendChild( $session->make_element( "img", src => "/images/orcid_id.svg", class => "orcid-icon", alt => "ORCID logo" ) );
$link->appendChild( $session->make_text( "https://orcid.org/$value" ) );

return $link;
Expand Down
17 changes: 17 additions & 0 deletions lib/static/images/orcid_id.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion lib/static/style/auto/orcid_support.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

.orcid-icon{
vertical-align: bottom;
padding-right: 5px;
padding-right: 0px;
margin-right: 5px;
width: 16px;
}

.orcid-icon img{
Expand Down
Loading

0 comments on commit b349687

Please sign in to comment.