Skip to content

Commit

Permalink
#1 Updated aria attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
psychome004 committed Aug 20, 2021
1 parent 8d5fb0a commit 0384de9
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 11 deletions.
18 changes: 12 additions & 6 deletions assets/css/shortcodes.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
padding: 16px 28px;
background: #6934c5;
color: #ffffff;
text-decoration: none !important;
outline: none !important;
-webkit-box-sizing: border-box;
box-sizing: border-box;
border: 1px solid #6934c5;
Expand Down Expand Up @@ -80,20 +78,28 @@
color: #000000;
}

.dsroi-announcements .date {
.dsroi-announcements .announcement-date {
margin-right: 10px;
color: #1e1e1e;
}

.dsroi-announcements .title {
text-decoration: underline;
outline: none;
.dsroi-announcements .title .announcement-title {
color: #55299e;
text-decoration: underline;
}

.dsroi-announcements .title:hover {
color: #3f1f7a;
}

.dsroi-modules .title > a,
.dsroi-modules .open-module,
.dsroi-announcements .title,
.dsroi-announcements .announcement-date{
text-decoration: none;
outline: none;
}

/* DSROI BUTTON SHORTCODE */
.dsroi-default-btn,
.dsroi-download-btn{
Expand Down
10 changes: 10 additions & 0 deletions lib/class-dsroi-wp-util.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,14 @@ public static function isRedirectRequired(){
return false;
}

public static function getModuleNumber(){
$module_number = get_post_meta( get_the_ID(), 'module_number', true );
return $module_number;
}

public static function getWeekText(){
$weekText = self::getModuleNumber() > 0 ? "Week ".self::getModuleNumber().": " : "";
return $weekText;
}

}
6 changes: 3 additions & 3 deletions shortcodes/templates/announcements.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<ul id="<?php _e( $atts['id'] );?>" class="dsroi-announcements">
<?php while( $dsroi_query->have_posts() ) : $dsroi_query->the_post();?>
<li class="post-announcement">
<span class="date"><?php the_time('j M y'); ?>:</span>
<a class="title" href="<?php the_permalink(); ?>" role="link">
<?php the_title(); ?>
<a class="title" href="<?php the_permalink(); ?>" role="link" aria-label="announcement, <?php the_time('jS F');?>, <?php the_title();?>">
<span class="announcement-date"><?php the_time("j M 'y"); ?>:</span>
<span class="announcement-title"><?php the_title(); ?></span>
</a>
</li>
<?php endwhile;?>
Expand Down
6 changes: 4 additions & 2 deletions shortcodes/templates/modules.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@
<li class="post-module">
<div class="module-inner">
<div class="title">
<h4><?php the_title(); ?></h4>
<a href="<?php the_permalink(); ?>" role="link">
<h4><?php echo DSROI_WP_UTIL::getWeekText(); the_title(); ?></h4>
</a>
</div>
<a class="open-module" href="<?php the_permalink(); ?>" role="link">
<a class="open-module" href="<?php the_permalink(); ?>" role="link" aria-label="open week<?php echo DSROI_WP_UTIL::getModuleNumber();?> module">
<i class="fa fa-file-text" aria-hidden="true"></i>
<span>Open</span>
</a>
Expand Down

0 comments on commit 0384de9

Please sign in to comment.