Close dialogue1/2Next 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 Charley Hull gets a drive away in practice at Bernardus Golf. Photograph: Kate McShane/Getty ImagesView image in fullscreenCharley Hull gets a drive away in practice at Bernardus Golf. Photograph: Kate McShane/Getty ImagesSolheim CupSolheim Cup vice-captain denies Charley Hull’s late arrival due to ‘drinks’Teetotal Hull teed off alone in practice
Prefer the Guardian on GoogleCharley Hull has, unsurprisingly, been involved in a colourful start to Solheim Cup week. After arriving late for her Tuesday practice tee time in the Netherlands, an online clip of her joking about the reason prompted a cascade of online speculation and ended with members of the European team hierarchy forcibly denying any overindulgence on the teetotal Hull’s behalf on Monday night.
In an unusual scene, Hull, who is crucial to Europe’s quest to reclaim the Solheim Cup from the US this week, drove off alone at Bernardus Golf and caught up with her teammates after arriving on the 1st tee minutes behind them. In a clip that gained traction, Hull appeared to jokingly blame “drinks” from the night before. The English golfer did, however, seem to point towards her caddie at the time.
Read moreWhen asked about Hull’s delayed arrival, the European vice-captain Mel Reid, slightly strangely, focused firstly on the online speculation. “It is a completely false story,” said Reid. “Charley Hull was the first one to bed last night at eight o’clock and the first one on the bus this morning. She doesn’t even drink. So that is a completely false story that has been misquoted.
“She was late to the tee because I was responsible for her so I will take a little bit of responsibility for that. She just thought her tee time was a little bit later and trying to drag Charley Hull off the range is a feat in any tournament, especially a Solheim Cup.”
When it was pointed out to Reid that many observers were unaware of the “false story” anyway, she said: “I kind of want to shut this down before people start talking about it. She was late because one, I couldn’t drag her off the range and two, she thought her tee time was five minutes later.”