Skip to content

Commit 76465a9

Browse files
committed
Added a small fix regarding rstaib#56
1 parent b96c452 commit 76465a9

10 files changed

+16
-19
lines changed

CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 1.0.6
4+
- Small fix. Closes issue [#56](https://github.com/rstaib/jquery-steps/issues/56)
5+
36
## 1.0.5
47

58
- Added a cancel button

build/jQuery.Steps.1.0.5.nupkg

-19.4 KB
Binary file not shown.

build/jQuery.Steps.1.0.6.nupkg

19.4 KB
Binary file not shown.

build/jquery.steps-1.0.5.zip

-18.7 KB
Binary file not shown.

build/jquery.steps-1.0.6.zip

18.7 KB
Binary file not shown.

build/jquery.steps.js

+5-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* jQuery Steps v1.0.5 - 04/27/2014
2+
* jQuery Steps v1.0.6 - 04/27/2014
33
* Copyright (c) 2014 Rafael Staib (http://www.jquery-steps.com)
44
* Licensed under MIT http://www.opensource.org/licenses/MIT
55
*/
@@ -624,7 +624,7 @@ function insertStep(wizard, options, state, index, step)
624624
getStepPanel(wizard, (index - 1)).after(body).after(header);
625625
}
626626

627-
renderBody(wizard, body, index);
627+
renderBody(wizard, state, body, index);
628628
renderTitle(wizard, options, state, header, index);
629629
refreshSteps(wizard, options, state, index);
630630
if (index === state.currentIndex)
@@ -1001,12 +1001,9 @@ function render(wizard, options, state)
10011001
// Add WIA-ARIA support
10021002
stepContents.each(function (index)
10031003
{
1004-
renderBody(wizard, $(this), index);
1004+
renderBody(wizard, state, $(this), index);
10051005
});
10061006

1007-
// Make the start step visible
1008-
stepContents.eq(state.currentIndex)._showAria();
1009-
10101007
stepTitles.each(function (index)
10111008
{
10121009
renderTitle(wizard, options, state, $(this), index);
@@ -1026,14 +1023,14 @@ function render(wizard, options, state)
10261023
* @param body {Object} A jQuery body object
10271024
* @param index {Integer} The position of the body
10281025
*/
1029-
function renderBody(wizard, body, index)
1026+
function renderBody(wizard, state, body, index)
10301027
{
10311028
var uniqueId = getUniqueId(wizard),
10321029
uniqueBodyId = uniqueId + _tabpanelSuffix + index,
10331030
uniqueHeaderId = uniqueId + _titleSuffix + index;
10341031

10351032
body._id(uniqueBodyId).attr("role", "tabpanel")._aria("labelledby", uniqueHeaderId)
1036-
.addClass("body")._showAria(false);
1033+
.addClass("body")._showAria(state.currentIndex === index);
10371034
}
10381035

10391036
/**

build/jquery.steps.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "jquery-steps",
33
"title": "jQuery Steps",
4-
"version": "1.0.5",
4+
"version": "1.0.6",
55
"description": "A powerful jQuery wizard plugin that supports accessibility and HTML5",
66
"homepage": "http://www.jquery-steps.com",
77
"author": {

src/privates.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ function insertStep(wizard, options, state, index, step)
564564
getStepPanel(wizard, (index - 1)).after(body).after(header);
565565
}
566566

567-
renderBody(wizard, body, index);
567+
renderBody(wizard, state, body, index);
568568
renderTitle(wizard, options, state, header, index);
569569
refreshSteps(wizard, options, state, index);
570570
if (index === state.currentIndex)
@@ -941,12 +941,9 @@ function render(wizard, options, state)
941941
// Add WIA-ARIA support
942942
stepContents.each(function (index)
943943
{
944-
renderBody(wizard, $(this), index);
944+
renderBody(wizard, state, $(this), index);
945945
});
946946

947-
// Make the start step visible
948-
stepContents.eq(state.currentIndex)._showAria();
949-
950947
stepTitles.each(function (index)
951948
{
952949
renderTitle(wizard, options, state, $(this), index);
@@ -966,14 +963,14 @@ function render(wizard, options, state)
966963
* @param body {Object} A jQuery body object
967964
* @param index {Integer} The position of the body
968965
*/
969-
function renderBody(wizard, body, index)
966+
function renderBody(wizard, state, body, index)
970967
{
971968
var uniqueId = getUniqueId(wizard),
972969
uniqueBodyId = uniqueId + _tabpanelSuffix + index,
973970
uniqueHeaderId = uniqueId + _titleSuffix + index;
974971

975972
body._id(uniqueBodyId).attr("role", "tabpanel")._aria("labelledby", uniqueHeaderId)
976-
.addClass("body")._showAria(false);
973+
.addClass("body")._showAria(state.currentIndex === index);
977974
}
978975

979976
/**

steps.jquery.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"tabs",
1515
"steps"
1616
],
17-
"version": "1.0.5",
17+
"version": "1.0.6",
1818
"author": {
1919
"name": "Rafael Staib",
2020
"email": "me@rafaelstaib.com",

0 commit comments

Comments
 (0)