Close dialogue1/1Next imagePrevious imageToggle captionPrint subscriptionsSearch jobs Sign indocument.addEventListener('DOMContentLoaded', function () {
/** The checkbox input element used to toggle the navigation menu. */
const navInputCheckbox = document.getElementById('header-nav-input-checkbox');
/** The veggie burger button element used to open/close the menu. */
const veggieBurger = document.getElementById('header-veggie-burger');
/** List of menu items that should be selectable when the menu is open. */
const expandedMenuClickableTags = document.querySelectorAll(
'.selectableMenuItem',
);
/** The root element of the expanded menu. */
const expandedMenu = document.getElementById('header-expanded-menu-root');
/** The label for the first column in the menu, assumed to be "News".*/
const firstColLabel = document.getElementById('News-button');
/** The link element in the second list item under news links. */
const firstColLink = document.querySelector(
'#newsLinks > li:nth-of-type(2) > a',
);
/**
* Focuses on the first navigation element depending on whether the first column label is visible.
*
* If the first column label is not visible, the function focuses on the first link element.
* Otherwise, it focuses on the first column label.
*/
const focusOnFirstNavElement = () => {
if (window.getComputedStyle(firstColLabel).display === 'none') {
firstColLink.focus();
} else {
firstColLabel.focus();
}
};
/**
* Updates ARIA attributes and tabindex values based on whether the menu is open or closed.
*/
const updateAttributesForMenu = (isOpen) => {
firstColLabel.setAttribute('aria-expanded', isOpen ? 'true' : 'false');
veggieBurger.setAttribute(
'data-link-name',
isOpen
? 'header : veggie-burger : hide'
: 'header : veggie-burger : show',
);
expandedMenuClickableTags.forEach((tag) => {
tag.setAttribute('tabindex', isOpen ? '0' : '-1');
});
};
/** Toggles the navigation menu by simulating a click on the checkbox. */
const toggleMainMenu = () => {
if (navInputCheckbox) {
navInputCheckbox.click();
}
};
/**
* Handles keydown events to toggle the menu when the Enter or Space key is pressed.
*/
const keydownToggleMainMenu = (e) => {
if (e.key === 'Enter' || e.key === ' ') {
e.preventDefault();
toggleMainMenu();
}
};
/**
* Handles click events to manage the state of the navigation menu.
*
* - Toggles the menu open/close state when the menu button (veggieBurger) is clicked.
*/
const handleMenuClick = (e) => {
const menuButtonClicked = navInputCheckbox === e.target;
const clickInsideMenu = expandedMenu.contains(e.target);
const menuIsOpen = navInputCheckbox.checked
if (menuButtonClicked && !menuIsOpen) {
document.body.classList.toggle('nav-is-open')
firstColLabel.setAttribute('aria-expanded', 'false')
veggieBurger.setAttribute('data-link-name','header : veggie-burger : show')
expandedMenuClickableTags.forEach(function($selectableElement){
$selectableElement.setAttribute('tabindex','-1')
})
} else if (menuButtonClicked && menuIsOpen) {
document.body.classList.toggle('nav-is-open')
firstColLabel.setAttribute('aria-expanded', 'true')
veggieBurger.setAttribute('data-link-name','header : veggie-burger : hide')
expandedMenuClickableTags.forEach(function($selectableElement){
$selectableElement.setAttribute('tabindex','0')
})
focusOnFirstNavElement()
}
};
/** Adds event listeners to manage the navigation menu. */
if (navInputCheckbox) {
navInputCheckbox.addEventListener('click', handleMenuClick);
veggieBurger.addEventListener('keydown', keydownToggleMainMenu);
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape' && navInputCheckbox.checked) {
toggleMainMenu();
veggieBurger.focus();
}
});
/**
* Handles mouse down events to manage the state of the navigation menu.
*
* - Closes the menu if the click occurs outside both the menu button and the expanded menu.
*/
document.addEventListener('mousedown', function(e){
if(navInputCheckbox.checked && !expandedMenu.contains(e.target) && !veggieBurger.contains(e.target)){
toggleMainMenu()
}
});
}
});UKUK editionUS editionAustralia editionEurope editionInternational editionThe Guardian - Back to homeThe GuardianNewsOpinionSportCultureLifestyleShow moreHide expanded menudocument.addEventListener('DOMContentLoaded', function(){
var columnInput = document.getElementById('News-button');
if (!columnInput) return; // Sticky nav replaces the nav so element no longer exists for users in test.
columnInput.addEventListener('keydown', function(e){
// keyCode: 13 => Enter key | keyCode: 32 => Space key
if (e.keyCode === 13 || e.keyCode === 32) {
e.preventDefault()
document.getElementById('News-checkbox-input').click();
}
})
})NewsView all NewsUK newsUS politicsWorld newsClimate crisisMiddle EastUkraineFootballNewslettersBusinessEnvironmentUK politicsScienceTechGlobal developmentObituariesdocument.addEventListener('DOMContentLoaded', function(){
var columnInput = document.getElementById('Opinion-button');
if (!columnInput) return; // Sticky nav replaces the nav so element no longer exists for users in test.
columnInput.addEventListener('keydown', function(e){
// keyCode: 13 => Enter key | keyCode: 32 => Space key
if (e.keyCode === 13 || e.keyCode === 32) {
e.preventDefault()
document.getElementById('Opinion-checkbox-input').click();
}
})
})OpinionView all OpinionThe Guardian viewColumnistsCartoonsOpinion videosLettersdocument.addEventListener('DOMContentLoaded', function(){
var columnInput = document.getElementById('Sport-button');
if (!columnInput) return; // Sticky nav replaces the nav so element no longer exists for users in test.
columnInput.addEventListener('keydown', function(e){
// keyCode: 13 => Enter key | keyCode: 32 => Space key
if (e.keyCode === 13 || e.keyCode === 32) {
e.preventDefault()
document.getElementById('Sport-checkbox-input').click();
}
})
})SportView all SportFootballCricketRugby unionTennisCyclingF1GolfBoxingRugby leagueRacingUS sportsdocument.addEventListener('DOMContentLoaded', function(){
var columnInput = document.getElementById('Culture-button');
if (!columnInput) return; // Sticky nav replaces the nav so element no longer exists for users in test.
columnInput.addEventListener('keydown', function(e){
// keyCode: 13 => Enter key | keyCode: 32 => Space key
if (e.keyCode === 13 || e.keyCode === 32) {
e.preventDefault()
document.getElementById('Culture-checkbox-input').click();
}
})
})CultureView all CultureFilmMusicTV & radioBooksArt & designStageGamesClassicaldocument.addEventListener('DOMContentLoaded', function(){
var columnInput = document.getElementById('Lifestyle-button');
if (!columnInput) return; // Sticky nav replaces the nav so element no longer exists for users in test.
columnInput.addEventListener('keydown', function(e){
// keyCode: 13 => Enter key | keyCode: 32 => Space key
if (e.keyCode === 13 || e.keyCode === 32) {
e.preventDefault()
document.getElementById('Lifestyle-checkbox-input').click();
}
})
})LifestyleView all LifestyleThe FilterFashionFoodRecipesTravelHealth & fitnessWomenMenLove & sexBeautyHome & gardenMoneyCarsSearch input google-search SearchSupport usPrint subscriptionsSearch jobsHire with Guardian JobsHolidaysLive eventsAbout UsDigital ArchiveGuardian Print ShopPatronsGuardian LicensingThe Guardian appVideoPodcastsPicturesNewslettersToday's paperInside the GuardianGuardian WeeklyCrosswordsWordiplyCorrectionsTipsSearch input google-search SearchSearch jobsHire with Guardian JobsHolidaysLive eventsAbout UsDigital ArchiveGuardian Print ShopPatronsGuardian LicensingFootballCricketRugby unionTennisCyclingF1GolfBoxingRugby leagueRacingUS sports Courtney Lawes in action for England against South Africa in the 2023 World Cup. Photograph: Thibault Camus/APView image in fullscreenCourtney Lawes in action for England against South Africa in the 2023 World Cup. Photograph: Thibault Camus/APEngland rugby union teamEngland coaches tell Lawes and Marchant they need to prove themselves in PremPair have joined Sale after spells in France
Prefer the Guardian on GoogleCourtney Lawes and Joe Marchant have been warned they must go “over and above” the performances of their rivals in the first five weeks of the new season to earn England recalls this autumn.
Lawes, 37, and the 30-year-old Marchant have both joined Sale this summer after spells in France and stated their ambition to resurrect their international careers, having last represented England at the 2023 World Cup.
Read moreLawes retired from international duty after that tournament and helped Northampton to secure the Prem title before heading to Brive in France’s second tier for two years, while Marchant spent three seasons at Stade Français before agreeing a move to the north-west.
While both are now eligible for selection again, Steve Borthwick has not chosen them for the pre-season camp this week and the pair have been challenged to prove they warrant a place in the autumn squad expected to be named in late October.
“It is great to have [Courtney] back, [he has] unbelievable experience, [he’s] an England legend and he is back in pre-season, as everyone is, flying,” the England senior assistant coach Richard Wigglesworth said. “There is a real excitement about watching him back in the Prem so I am enjoying that.